diff options
author | Tianchen Ding <[email protected]> | 2024-06-26 10:35:05 +0800 |
---|---|---|
committer | Peter Zijlstra <[email protected]> | 2024-07-29 12:22:35 +0200 |
commit | faa42d29419def58d3c3e5b14ad4037f0af3b496 (patch) | |
tree | c64603b96df19d2af66d6c47a2119e976a702117 /tools/testing/selftests/bpf/prog_tests/autoload.c | |
parent | a58501fb8320d6232507f722b4c9dcd4e03362ee (diff) |
sched/fair: Make SCHED_IDLE entity be preempted in strict hierarchy
Consider the following cgroup:
root
|
------------------------
| |
normal_cgroup idle_cgroup
| |
SCHED_IDLE task_A SCHED_NORMAL task_B
According to the cgroup hierarchy, A should preempt B. But current
check_preempt_wakeup_fair() treats cgroup se and task separately, so B
will preempt A unexpectedly.
Unify the wakeup logic by {c,p}se_is_idle only. This makes SCHED_IDLE of
a task a relative policy that is effective only within its own cgroup,
similar to the behavior of NICE.
Also fix se_is_idle() definition when !CONFIG_FAIR_GROUP_SCHED.
Fixes: 304000390f88 ("sched: Cgroup SCHED_IDLE support")
Signed-off-by: Tianchen Ding <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Josh Don <[email protected]>
Reviewed-by: Vincent Guittot <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions