Commit ac8e69e
sched/fair: Fix wakeup_preempt_fair() vs delayed dequeue
Similar to how pick_next_entity() must dequeue delayed entities, so too must
wakeup_preempt_fair(). Any delayed task being found means it is eligible and
hence past the 0-lag point, ready for removal.
Worse, by not removing delayed entities from consideration, it can skew the
preemption decision, with the end result that a short slice wakeup will not
result in a preemption.
tip/sched/core tip/sched/core +this patch
cyclictest slice (ms) (default)2.8 8 8
hackbench slice (ms) (default)2.8 20 20
Total Samples | 22559 22595 22683
Average (us) | 157 64( 59%) 59( 8%)
Median (P50) (us) | 57 57( 0%) 58(- 2%)
90th Percentile (us) | 64 60( 6%) 60( 0%)
99th Percentile (us) | 2407 67( 97%) 67( 0%)
99.9th Percentile (us) | 3400 2288( 33%) 727( 68%)
Maximum (us) | 5037 9252(-84%) 7461( 19%)
Fixes: f12e148 ("sched/fair: Prepare pick_next_task() for delayed dequeue")
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260422093400.319251-1-vincent.guittot@linaro.org1 parent c5cd6fd commit ac8e69e
1 file changed
Lines changed: 14 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1104 | 1104 | | |
1105 | 1105 | | |
1106 | 1106 | | |
1107 | | - | |
| 1107 | + | |
1108 | 1108 | | |
1109 | 1109 | | |
1110 | 1110 | | |
| |||
1175 | 1175 | | |
1176 | 1176 | | |
1177 | 1177 | | |
1178 | | - | |
1179 | | - | |
1180 | | - | |
1181 | | - | |
1182 | | - | |
1183 | 1178 | | |
1184 | 1179 | | |
1185 | 1180 | | |
| |||
5754 | 5749 | | |
5755 | 5750 | | |
5756 | 5751 | | |
5757 | | - | |
| 5752 | + | |
5758 | 5753 | | |
5759 | 5754 | | |
5760 | 5755 | | |
5761 | | - | |
| 5756 | + | |
5762 | 5757 | | |
5763 | 5758 | | |
5764 | 5759 | | |
| |||
9032 | 9027 | | |
9033 | 9028 | | |
9034 | 9029 | | |
9035 | | - | |
| 9030 | + | |
9036 | 9031 | | |
9037 | 9032 | | |
9038 | 9033 | | |
| |||
9143 | 9138 | | |
9144 | 9139 | | |
9145 | 9140 | | |
| 9141 | + | |
| 9142 | + | |
| 9143 | + | |
| 9144 | + | |
| 9145 | + | |
9146 | 9146 | | |
9147 | | - | |
| 9147 | + | |
| 9148 | + | |
9148 | 9149 | | |
9149 | | - | |
9150 | | - | |
| 9150 | + | |
| 9151 | + | |
9151 | 9152 | | |
9152 | 9153 | | |
9153 | 9154 | | |
| |||
9184 | 9185 | | |
9185 | 9186 | | |
9186 | 9187 | | |
9187 | | - | |
| 9188 | + | |
9188 | 9189 | | |
9189 | 9190 | | |
9190 | 9191 | | |
| |||
0 commit comments