Commit aa4f74d
sched: Fix runtime accounting w/ split exec & sched contexts
Without proxy-exec, we normally charge the "current" task for
both its vruntime as well as its sum_exec_runtime.
With proxy, however, we have two "current" contexts: the
scheduler context and the execution context. We want to charge
the execution context rq->curr (ie: proxy/lock holder) execution
time to its sum_exec_runtime (so it's clear to userland the
rq->curr task *is* running), as well as its thread group.
However the rest of the time accounting (such a vruntime and
cgroup accounting), we charge against the scheduler context
(rq->donor) task, because it is from that task that the time
is being "donated".
If the donor and curr tasks are the same, then it's the same as
without proxy.
Signed-off-by: John Stultz <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Tested-by: K Prateek Nayak <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]1 parent 865d8cf commit aa4f74d
1 file changed
+28
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1152 | 1152 | | |
1153 | 1153 | | |
1154 | 1154 | | |
1155 | | - | |
| 1155 | + | |
1156 | 1156 | | |
1157 | 1157 | | |
1158 | 1158 | | |
1159 | 1159 | | |
1160 | | - | |
| 1160 | + | |
1161 | 1161 | | |
1162 | 1162 | | |
1163 | 1163 | | |
1164 | | - | |
1165 | | - | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
1166 | 1174 | | |
1167 | | - | |
1168 | | - | |
| 1175 | + | |
| 1176 | + | |
1169 | 1177 | | |
1170 | | - | |
1171 | | - | |
1172 | | - | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
1173 | 1183 | | |
1174 | 1184 | | |
1175 | 1185 | | |
1176 | 1186 | | |
1177 | 1187 | | |
1178 | | - | |
| 1188 | + | |
1179 | 1189 | | |
1180 | 1190 | | |
1181 | 1191 | | |
| |||
1188 | 1198 | | |
1189 | 1199 | | |
1190 | 1200 | | |
1191 | | - | |
1192 | | - | |
1193 | | - | |
| 1201 | + | |
1194 | 1202 | | |
1195 | 1203 | | |
1196 | 1204 | | |
1197 | 1205 | | |
1198 | 1206 | | |
1199 | 1207 | | |
1200 | 1208 | | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
1201 | 1215 | | |
1202 | 1216 | | |
1203 | 1217 | | |
| |||
1206 | 1220 | | |
1207 | 1221 | | |
1208 | 1222 | | |
1209 | | - | |
| 1223 | + | |
1210 | 1224 | | |
1211 | 1225 | | |
1212 | 1226 | | |
| |||
0 commit comments