Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. Effectively changes prio from 99 to 50.
Unified · Split
| @@ -436,8 +436,6 @@ static int torture_rtmutex_lock(void) __acquires(torture_rtmutex) · 435 unmodified lines | |||
| 436 | 436 | ||
| 437 | static void torture_rtmutex_boost(struct torture_random_state *trsp) | 437 | static void torture_rtmutex_boost(struct torture_random_state *trsp) |
| 438 | { | 438 | { |
| 439 | int policy; | ||
| 440 | struct sched_param param; | ||
| 441 | const unsigned int factor = 50000; /* yes, quite arbitrary */ | 439 | const unsigned int factor = 50000; /* yes, quite arbitrary */ |
| 442 | 440 | ||
| 443 | if (!rt_task(current)) { | 441 | if (!rt_task(current)) { |
| @@ -448,8 +446,7 @@ static void torture_rtmutex_boost(struct torture_random_state *trsp) · 4 unmodified lines | |||
| 448 | */ | 446 | */ |
| 449 | if (trsp && !(torture_random(trsp) % | 447 | if (trsp && !(torture_random(trsp) % |
| 450 | (cxt.nrealwriters_stress * factor))) { | 448 | (cxt.nrealwriters_stress * factor))) { |
| 451 | policy = SCHED_FIFO; | 449 | sched_set_fifo(current); |
| 452 | param.sched_priority = MAX_RT_PRIO - 1; | ||
| 453 | } else /* common case, do nothing */ | 450 | } else /* common case, do nothing */ |
| 454 | return; | 451 | return; |
| 455 | } else { | 452 | } else { |
| @@ -462,13 +459,10 @@ static void torture_rtmutex_boost(struct torture_random_state *trsp) · 6 unmodified lines | |||
| 462 | */ | 459 | */ |
| 463 | if (!trsp || !(torture_random(trsp) % | 460 | if (!trsp || !(torture_random(trsp) % |
| 464 | (cxt.nrealwriters_stress * factor * 2))) { | 461 | (cxt.nrealwriters_stress * factor * 2))) { |
| 465 | policy = SCHED_NORMAL; | 462 | sched_set_normal(current, 0); |
| 466 | param.sched_priority = 0; | ||
| 467 | } else /* common case, do nothing */ | 463 | } else /* common case, do nothing */ |
| 468 | return; | 464 | return; |
| 469 | } | 465 | } |
| 470 | |||
| 471 | sched_setscheduler_nocheck(current, policy, ¶m); | ||
| 472 | } | 466 | } |
| 473 | 467 | ||
| 474 | static void torture_rtmutex_delay(struct torture_random_state *trsp) | 468 | static void torture_rtmutex_delay(struct torture_random_state *trsp) |