Commit 4ae8d9a
Peter Zijlstra
sched/deadline: Fix dl_server getting stuck
John found it was easy to hit lockup warnings when running locktorture
on a 2 CPU VM, which he bisected down to: commit cccb45d
("sched/deadline: Less agressive dl_server handling").
While debugging it seems there is a chance where we end up with the
dl_server dequeued, with dl_se->dl_server_active. This causes
dl_server_start() to return without enqueueing the dl_server, thus it
fails to run when RT tasks starve the cpu.
When this happens, dl_server_timer() catches the
'!dl_se->server_has_tasks(dl_se)' case, which then calls
replenish_dl_entity() and dl_server_stopped() and finally return
HRTIMER_NO_RESTART.
This ends in no new timer and also no enqueue, leaving the dl_server
'dead', allowing starvation.
What should have happened is for the bandwidth timer to start the
zero-laxity timer, which in turn would enqueue the dl_server and cause
dl_se->server_pick_task() to be called -- which will stop the
dl_server if no fair tasks are observed for a whole period.
IOW, it is totally irrelevant if there are fair tasks at the moment of
bandwidth refresh.
This removes all dl_se->server_has_tasks() users, so remove the whole
thing.
Fixes: cccb45d ("sched/deadline: Less agressive dl_server handling")
Reported-by: John Stultz <jstultz@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: John Stultz <jstultz@google.com>1 parent f83ec76 commit 4ae8d9a
4 files changed
+2
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
736 | | - | |
737 | 736 | | |
738 | 737 | | |
739 | 738 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
875 | 875 | | |
876 | 876 | | |
877 | 877 | | |
878 | | - | |
| 878 | + | |
879 | 879 | | |
880 | 880 | | |
881 | 881 | | |
| |||
1152 | 1152 | | |
1153 | 1153 | | |
1154 | 1154 | | |
1155 | | - | |
1156 | | - | |
1157 | 1155 | | |
1158 | 1156 | | |
1159 | 1157 | | |
| |||
1171 | 1169 | | |
1172 | 1170 | | |
1173 | 1171 | | |
1174 | | - | |
1175 | | - | |
1176 | | - | |
1177 | | - | |
1178 | | - | |
1179 | | - | |
1180 | 1172 | | |
1181 | 1173 | | |
1182 | 1174 | | |
| |||
1625 | 1617 | | |
1626 | 1618 | | |
1627 | 1619 | | |
1628 | | - | |
1629 | 1620 | | |
1630 | 1621 | | |
1631 | 1622 | | |
1632 | | - | |
1633 | 1623 | | |
1634 | 1624 | | |
1635 | 1625 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8859 | 8859 | | |
8860 | 8860 | | |
8861 | 8861 | | |
8862 | | - | |
8863 | | - | |
8864 | | - | |
8865 | | - | |
8866 | | - | |
8867 | 8862 | | |
8868 | 8863 | | |
8869 | 8864 | | |
| |||
8875 | 8870 | | |
8876 | 8871 | | |
8877 | 8872 | | |
8878 | | - | |
| 8873 | + | |
8879 | 8874 | | |
8880 | 8875 | | |
8881 | 8876 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | 368 | | |
372 | 369 | | |
373 | 370 | | |
| |||
383 | 380 | | |
384 | 381 | | |
385 | 382 | | |
386 | | - | |
387 | 383 | | |
388 | 384 | | |
389 | 385 | | |
| |||
0 commit comments