Commit bd9bbc9
Peter Zijlstra
sched: Rework dl_server
When a task is selected through a dl_server, it will have p->dl_server
set, such that it can account runtime to the dl_server, see
update_curr_task().
Currently p->dl_server is set in pick*task() whenever it goes through
the dl_server, clearing it is a bit of a mess though. The trivial
solution is clearing it on the final put (now that we have this
location).
However, this gives a problem when:
p = pick_task(rq);
if (p)
put_prev_set_next_task(rq, prev, next);
picks the same task but through a different path, notably when it goes
from picking through the dl_server to a direct pick or vice-versa. In
that case we cannot readily determine wether we should clear or
preserve p->dl_server.
An additional complication is pick_*task() setting p->dl_server for a
remote pick, it might still need to update runtime before it schedules
the core_pick.
Close all these holes and remove all the random clearing of
p->dl_server by:
- having pick_*task() manage rq->dl_server
- having the final put_prev_task() clear p->dl_server
- having the first set_next_task() set p->dl_server = rq->dl_server
- complicate the core_sched code to save/restore rq->dl_server where
appropriate.
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent 436f3ee commit bd9bbc9
4 files changed
+32
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3668 | 3668 | | |
3669 | 3669 | | |
3670 | 3670 | | |
3671 | | - | |
3672 | | - | |
3673 | 3671 | | |
3674 | 3672 | | |
3675 | 3673 | | |
| |||
5859 | 5857 | | |
5860 | 5858 | | |
5861 | 5859 | | |
5862 | | - | |
5863 | | - | |
5864 | | - | |
5865 | | - | |
5866 | | - | |
5867 | | - | |
5868 | | - | |
5869 | | - | |
5870 | 5860 | | |
5871 | 5861 | | |
5872 | 5862 | | |
| |||
5878 | 5868 | | |
5879 | 5869 | | |
5880 | 5870 | | |
| 5871 | + | |
| 5872 | + | |
5881 | 5873 | | |
5882 | 5874 | | |
5883 | 5875 | | |
| |||
5897 | 5889 | | |
5898 | 5890 | | |
5899 | 5891 | | |
5900 | | - | |
5901 | | - | |
5902 | | - | |
5903 | | - | |
5904 | | - | |
5905 | | - | |
5906 | | - | |
5907 | | - | |
5908 | | - | |
5909 | | - | |
5910 | | - | |
5911 | | - | |
5912 | | - | |
5913 | | - | |
5914 | 5892 | | |
5915 | 5893 | | |
5916 | 5894 | | |
| |||
5958 | 5936 | | |
5959 | 5937 | | |
5960 | 5938 | | |
| 5939 | + | |
| 5940 | + | |
5961 | 5941 | | |
5962 | 5942 | | |
5963 | 5943 | | |
| |||
5996 | 5976 | | |
5997 | 5977 | | |
5998 | 5978 | | |
| 5979 | + | |
5999 | 5980 | | |
6000 | 5981 | | |
6001 | 5982 | | |
| |||
6014 | 5995 | | |
6015 | 5996 | | |
6016 | 5997 | | |
| 5998 | + | |
6017 | 5999 | | |
| 6000 | + | |
6018 | 6001 | | |
6019 | 6002 | | |
6020 | 6003 | | |
| |||
6059 | 6042 | | |
6060 | 6043 | | |
6061 | 6044 | | |
| 6045 | + | |
6062 | 6046 | | |
6063 | 6047 | | |
6064 | 6048 | | |
| |||
6086 | 6070 | | |
6087 | 6071 | | |
6088 | 6072 | | |
6089 | | - | |
| 6073 | + | |
| 6074 | + | |
| 6075 | + | |
6090 | 6076 | | |
6091 | 6077 | | |
6092 | 6078 | | |
| |||
6110 | 6096 | | |
6111 | 6097 | | |
6112 | 6098 | | |
| 6099 | + | |
6113 | 6100 | | |
6114 | 6101 | | |
6115 | 6102 | | |
| |||
6170 | 6157 | | |
6171 | 6158 | | |
6172 | 6159 | | |
| 6160 | + | |
6173 | 6161 | | |
6174 | 6162 | | |
6175 | 6163 | | |
| |||
6178 | 6166 | | |
6179 | 6167 | | |
6180 | 6168 | | |
| 6169 | + | |
6181 | 6170 | | |
6182 | 6171 | | |
6183 | 6172 | | |
| |||
8401 | 8390 | | |
8402 | 8391 | | |
8403 | 8392 | | |
| 8393 | + | |
8404 | 8394 | | |
8405 | 8395 | | |
8406 | 8396 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2423 | 2423 | | |
2424 | 2424 | | |
2425 | 2425 | | |
2426 | | - | |
| 2426 | + | |
2427 | 2427 | | |
2428 | 2428 | | |
2429 | 2429 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8749 | 8749 | | |
8750 | 8750 | | |
8751 | 8751 | | |
8752 | | - | |
8753 | | - | |
8754 | | - | |
8755 | | - | |
8756 | | - | |
8757 | | - | |
8758 | | - | |
8759 | | - | |
8760 | 8752 | | |
8761 | 8753 | | |
8762 | 8754 | | |
| |||
8780 | 8772 | | |
8781 | 8773 | | |
8782 | 8774 | | |
| 8775 | + | |
| 8776 | + | |
8783 | 8777 | | |
8784 | 8778 | | |
8785 | 8779 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1066 | 1066 | | |
1067 | 1067 | | |
1068 | 1068 | | |
| 1069 | + | |
1069 | 1070 | | |
1070 | 1071 | | |
1071 | 1072 | | |
| |||
1193 | 1194 | | |
1194 | 1195 | | |
1195 | 1196 | | |
| 1197 | + | |
1196 | 1198 | | |
1197 | 1199 | | |
1198 | 1200 | | |
| |||
2370 | 2372 | | |
2371 | 2373 | | |
2372 | 2374 | | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
2373 | 2385 | | |
2374 | 2386 | | |
2375 | 2387 | | |
2376 | 2388 | | |
2377 | 2389 | | |
2378 | 2390 | | |
| 2391 | + | |
| 2392 | + | |
2379 | 2393 | | |
2380 | 2394 | | |
2381 | 2395 | | |
| |||
0 commit comments