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 | 437 | static void torture_rtmutex_boost(struct torture_random_state *trsp) |
| 438 | 438 | { |
| 439 | − int policy; | |
| 440 | − struct sched_param param; | |
| 441 | 439 | const unsigned int factor = 50000; /* yes, quite arbitrary */ |
| 442 | 440 | |
| 443 | 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 | 447 | if (trsp && !(torture_random(trsp) % |
| 450 | 448 | (cxt.nrealwriters_stress * factor))) { |
| 451 | − policy = SCHED_FIFO; | |
| 452 | − param.sched_priority = MAX_RT_PRIO - 1; | |
| 449 | + sched_set_fifo(current); | |
| 453 | 450 | } else /* common case, do nothing */ |
| 454 | 451 | return; |
| 455 | 452 | } else { |
| @@ -462,13 +459,10 @@ static void torture_rtmutex_boost(struct torture_random_state *trsp) · 6 unmodified lines | ||
| 462 | 459 | */ |
| 463 | 460 | if (!trsp || !(torture_random(trsp) % |
| 464 | 461 | (cxt.nrealwriters_stress * factor * 2))) { |
| 465 | − policy = SCHED_NORMAL; | |
| 466 | − param.sched_priority = 0; | |
| 462 | + sched_set_normal(current, 0); | |
| 467 | 463 | } else /* common case, do nothing */ |
| 468 | 464 | return; |
| 469 | 465 | } |
| 470 | − | |
| 471 | − sched_setscheduler_nocheck(current, policy, ¶m); | |
| 472 | 466 | } |
| 473 | 467 | |
| 474 | 468 | static void torture_rtmutex_delay(struct torture_random_state *trsp) |