From: Chen Jinghuang <chenjinghuang2@huawei.com>
To: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
<linux-kernel@vger.kernel.org>
Subject: [QUESTION] sched/fair: EEVDF min_slice stalls in parent cgroup with a continuously running child task
Date: Wed, 17 Jun 2026 03:33:25 +0000 [thread overview]
Message-ID: <20260617033325.1532258-1-chenjinghuang2@huawei.com> (raw)
Hi all,
I observed an unexpected behavior regarding the EEVDF min_slice update
mechanism in a hierarchical cgroup v1 setup. It appears that the parent
cgroup's min_slice can become stale when a child cgroup contains a
continuously running task (100% load, no sleep). The parent's min_slice
fails to update when global or entity slices change, until a dequeue/enqueue
event occurs in the child cgroup.
Here is the topology of the scenario:
Root cfs_rq
|
cgroup A (se A, contains cpu_sim_A)
|
cgroup A1 (se A1, contains cpu_sim_A1, 100% CPU load)
Steps to reproduce:
1. Create cgroup A, and a sub-cgroup A1 under A.
2. Move a task (cpu_sim_A) into cgroup A, and use the syscall
__NR_sched_setattr to explicitly set its slice to 3ms.
3. Set the global base_slice_ns to 3ms:
echo 3000000 > /sys/kernel/debug/sched/base_slice_ns
4. Move a 100% load task (cpu_sim_A1, which never voluntary sleeps) into
cgroup A1.
At this point, both cgroup A's min_slice and cgroup A1's min_slice are
observed as 0.1ms (the initialized or previous low value).
5. Change the global base_slice_ns to 2.8ms:
echo 2800000 > /sys/kernel/debug/sched/base_slice_ns
Observations:
- cgroup A1's min_slice correctly updates to 2.8ms.
- However, cgroup A's min_slice remains unchanged (stuck at 0.1ms).
- Even if we use syscall(__NR_sched_setattr) to explicitly set cpu_sim_A's
slice in cgroup A to 2.8ms, cgroup A's min_slice still does not update.
- The only way to force cgroup A's min_slice to update to 2.8ms is to
trigger a dequeue/enqueue cycle for the task in cgroup A1 (e.g., by
renice it)
It appears that a parent cgroup's min_slice is only updated when its
children are enqueued or dequeued. If a child task runs continuously
without sleeping, the parent's min_slice gets stuck and ignores any
changes to base_slice_ns or individual entity slices.
Is this expected by design in EEVDF, or is there a missing update hook?
Any insights would be greatly appreciated.
Thanks,
Chen Jinghuang
next reply other threads:[~2026-06-17 3:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 3:33 Chen Jinghuang [this message]
2026-06-17 7:29 ` Vincent Guittot
2026-06-18 9:28 ` chenjinghuang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260617033325.1532258-1-chenjinghuang2@huawei.com \
--to=chenjinghuang2@huawei.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox