Commit c98c182
sched, cgroup: Restore meaning to hierarchical_quota
In cgroupv2 cfs_b->hierarchical_quota is set to -1 for all task
groups due to the previous fix simply taking the min. It should
reflect a limit imposed at that level or by an ancestor. Even
though cgroupv2 does not require child quota to be less than or
equal to that of its ancestors the task group will still be
constrained by such a quota so this should be shown here. Cgroupv1
continues to set this correctly.
In both cases, add initialization when a new task group is created
based on the current parent's value (or RUNTIME_INF in the case of
root_task_group). Otherwise, the field is wrong until a quota is
changed after creation and __cfs_schedulable() is called.
Fixes: c53593e ("sched, cgroup: Don't reject lower cpu.max on ancestors")
Signed-off-by: Phil Auld <pauld@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Ben Segall <bsegall@google.com>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20230714125746.812891-1-pauld@redhat.com1 parent 113d0a6 commit c98c182
3 files changed
Lines changed: 14 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9953 | 9953 | | |
9954 | 9954 | | |
9955 | 9955 | | |
9956 | | - | |
| 9956 | + | |
9957 | 9957 | | |
9958 | 9958 | | |
9959 | 9959 | | |
| |||
11087 | 11087 | | |
11088 | 11088 | | |
11089 | 11089 | | |
11090 | | - | |
11091 | | - | |
| 11090 | + | |
| 11091 | + | |
| 11092 | + | |
| 11093 | + | |
11092 | 11094 | | |
11093 | 11095 | | |
11094 | | - | |
| 11096 | + | |
| 11097 | + | |
| 11098 | + | |
| 11099 | + | |
11095 | 11100 | | |
11096 | 11101 | | |
11097 | 11102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6045 | 6045 | | |
6046 | 6046 | | |
6047 | 6047 | | |
6048 | | - | |
| 6048 | + | |
6049 | 6049 | | |
6050 | 6050 | | |
6051 | 6051 | | |
6052 | 6052 | | |
6053 | 6053 | | |
6054 | 6054 | | |
| 6055 | + | |
6055 | 6056 | | |
6056 | 6057 | | |
6057 | 6058 | | |
| |||
6217 | 6218 | | |
6218 | 6219 | | |
6219 | 6220 | | |
6220 | | - | |
| 6221 | + | |
6221 | 6222 | | |
6222 | 6223 | | |
6223 | 6224 | | |
| |||
12599 | 12600 | | |
12600 | 12601 | | |
12601 | 12602 | | |
12602 | | - | |
| 12603 | + | |
12603 | 12604 | | |
12604 | 12605 | | |
12605 | 12606 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
| 457 | + | |
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
| |||
0 commit comments