Commit 152e11f
Peter Zijlstra
sched/fair: Implement delayed dequeue
Extend / fix 86bfbb7 ("sched/fair: Add lag based placement") by
noting that lag is fundamentally a temporal measure. It should not be
carried around indefinitely.
OTOH it should also not be instantly discarded, doing so will allow a
task to game the system by purposefully (micro) sleeping at the end of
its time quantum.
Since lag is intimately tied to the virtual time base, a wall-time
based decay is also insufficient, notably competition is required for
any of this to make sense.
Instead, delay the dequeue and keep the 'tasks' on the runqueue,
competing until they are eligible.
Strictly speaking, we only care about keeping them until the 0-lag
point, but that is a difficult proposition, instead carry them around
until they get picked again, and dequeue them at that point.
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Valentin Schneider <[email protected]>
Tested-by: Valentin Schneider <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]1 parent e1459a5 commit 152e11f
3 files changed
+79
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2428 | 2428 | | |
2429 | 2429 | | |
2430 | 2430 | | |
2431 | | - | |
2432 | 2431 | | |
2433 | 2432 | | |
2434 | 2433 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5379 | 5379 | | |
5380 | 5380 | | |
5381 | 5381 | | |
5382 | | - | |
| 5382 | + | |
5383 | 5383 | | |
5384 | 5384 | | |
5385 | | - | |
| 5385 | + | |
| 5386 | + | |
| 5387 | + | |
| 5388 | + | |
| 5389 | + | |
| 5390 | + | |
5386 | 5391 | | |
| 5392 | + | |
| 5393 | + | |
| 5394 | + | |
| 5395 | + | |
| 5396 | + | |
| 5397 | + | |
| 5398 | + | |
| 5399 | + | |
| 5400 | + | |
| 5401 | + | |
| 5402 | + | |
| 5403 | + | |
| 5404 | + | |
| 5405 | + | |
| 5406 | + | |
| 5407 | + | |
| 5408 | + | |
| 5409 | + | |
| 5410 | + | |
5387 | 5411 | | |
5388 | 5412 | | |
5389 | 5413 | | |
5390 | | - | |
5391 | | - | |
5392 | | - | |
5393 | | - | |
5394 | | - | |
5395 | 5414 | | |
5396 | 5415 | | |
5397 | 5416 | | |
| |||
5428 | 5447 | | |
5429 | 5448 | | |
5430 | 5449 | | |
| 5450 | + | |
| 5451 | + | |
| 5452 | + | |
5431 | 5453 | | |
5432 | 5454 | | |
| 5455 | + | |
| 5456 | + | |
5433 | 5457 | | |
5434 | 5458 | | |
5435 | 5459 | | |
| |||
5828 | 5852 | | |
5829 | 5853 | | |
5830 | 5854 | | |
| 5855 | + | |
| 5856 | + | |
5831 | 5857 | | |
5832 | 5858 | | |
5833 | 5859 | | |
5834 | 5860 | | |
5835 | | - | |
| 5861 | + | |
| 5862 | + | |
| 5863 | + | |
| 5864 | + | |
| 5865 | + | |
| 5866 | + | |
| 5867 | + | |
| 5868 | + | |
| 5869 | + | |
5836 | 5870 | | |
5837 | 5871 | | |
5838 | 5872 | | |
| |||
6918 | 6952 | | |
6919 | 6953 | | |
6920 | 6954 | | |
| 6955 | + | |
6921 | 6956 | | |
6922 | 6957 | | |
6923 | 6958 | | |
| |||
6931 | 6966 | | |
6932 | 6967 | | |
6933 | 6968 | | |
6934 | | - | |
| 6969 | + | |
| 6970 | + | |
| 6971 | + | |
| 6972 | + | |
| 6973 | + | |
| 6974 | + | |
| 6975 | + | |
6935 | 6976 | | |
6936 | 6977 | | |
6937 | 6978 | | |
| |||
6956 | 6997 | | |
6957 | 6998 | | |
6958 | 6999 | | |
| 7000 | + | |
6959 | 7001 | | |
6960 | 7002 | | |
6961 | 7003 | | |
| |||
6985 | 7027 | | |
6986 | 7028 | | |
6987 | 7029 | | |
| 7030 | + | |
| 7031 | + | |
| 7032 | + | |
| 7033 | + | |
| 7034 | + | |
| 7035 | + | |
| 7036 | + | |
| 7037 | + | |
| 7038 | + | |
| 7039 | + | |
| 7040 | + | |
6988 | 7041 | | |
6989 | 7042 | | |
6990 | 7043 | | |
| |||
6997 | 7050 | | |
6998 | 7051 | | |
6999 | 7052 | | |
7000 | | - | |
| 7053 | + | |
| 7054 | + | |
7001 | 7055 | | |
| 7056 | + | |
7002 | 7057 | | |
7003 | 7058 | | |
7004 | 7059 | | |
| |||
12971 | 13026 | | |
12972 | 13027 | | |
12973 | 13028 | | |
| 13029 | + | |
| 13030 | + | |
| 13031 | + | |
| 13032 | + | |
| 13033 | + | |
12974 | 13034 | | |
12975 | 13035 | | |
12976 | 13036 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
31 | 40 | | |
32 | 41 | | |
33 | 42 | | |
| |||
0 commit comments