From: Fernand Sieber <sieberf@amazon.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Fernand Sieber <sieberf@amazon.com>,
Karl Mehltretter <kmehltretter@gmail.com>,
<stable@vger.kernel.org>, Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Shuah Khan <shuah@kernel.org>,
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>,
K Prateek Nayak <kprateek.nayak@amd.com>,
"Daniel Bristot de Oliveira" <bristot@kernel.org>,
Joel Fernandes <joelagnelf@nvidia.com>,
Josh Don <joshdon@google.com>, <linux-kernel@vger.kernel.org>,
<linux-kselftest@vger.kernel.org>, <nh-open-source@amazon.com>,
Fahad Mubeen <fmubeen@amazon.de>,
"David Woodhouse" <dwmw@amazon.co.uk>,
Misha Karataiev <karataev@amazon.com>,
Hendrik Borghorst <hborghor@amazon.de>,
Ibrahim Elshahed <lshahed@amazon.de>
Subject: [PATCH 0/2] sched/deadline: Fix forced idle charged when a sibling ends it
Date: Tue, 24 Nov 2026 11:40:29 +0200 [thread overview]
Message-ID: <cover.1795510960.git.sieberf@amazon.com> (raw)
In-Reply-To: <20261124080737.1988-1-kmehltretter@gmail.com>
Karl reported that "sched/deadline: Don't charge core-sched forced idle
to the DL servers" (f4626e1c3c14, in sched/urgent) still charges forced
idle to the DL servers when the sibling's cookied task blocks: the core
pick clears core_forceidle_count before the idle CPU charges the time.
With his 800 us spin / 10 us sleep FIFO pattern the CFS task gets
0.8-1.8% instead of its 5% reservation.
Patch 1 makes the core-wide pick charge each idle sibling's idle time
under the forced-idle state from before the pick, so that no charged
span crosses a change of that state. It adds no new state. Patch 2 adds
Karl's pattern to cs_dl_server_test.
Tested on sched/core. QEMU, 2 cores x 2 threads, 8 runs each:
tip/sched/core fails Karl's pattern 8/8; with these patches both tests
pass 8/8 (5.0% and 5.6-5.8%). Both patches apply to sched/urgent, where
the existing selftest already needs 87a825f3c680 ("sched/core: Rank DL
server picks as deadline in the core-wide pick"), as in my earlier mail.
This series was prepared with the help of an AI coding assistant. I have
reviewed and tested all of it.
Fernand Sieber (2):
sched/deadline: Keep forced idle uncharged when a sibling ends it
selftests/sched: Let the FIFO task block in cs_dl_server_test
kernel/sched/core.c | 8 ++
kernel/sched/idle.c | 25 +++-
kernel/sched/sched.h | 1 +
.../selftests/sched/cs_dl_server_test.c | 107 +++++++++++-------
4 files changed, 96 insertions(+), 45 deletions(-)
Amazon Development Centre (South Africa) (Proprietary) Limited
29 Gogosoa Street, Observatory, Cape Town, Western Cape, 7925, South Africa
Registration Number: 2004 / 034463 / 07
next prev parent reply other threads:[~2026-11-24 9:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 16:15 [PATCH 0/5] sched: Fix DL server starvation under core scheduling Fernand Sieber
2026-11-12 16:15 ` [PATCH 1/5] sched/core: Clear stale rq->dl_server when core-sched replaces a pick Fernand Sieber
2026-11-12 16:15 ` [PATCH 2/5] sched/core: Keep a sibling's DL server link in the core-wide pick Fernand Sieber
2026-11-18 13:50 ` Peter Zijlstra
2026-11-18 13:58 ` Peter Zijlstra
2026-11-12 16:15 ` [PATCH 3/5] sched/core: Rank DL server picks as deadline " Fernand Sieber
2026-11-18 13:52 ` Peter Zijlstra
2026-11-12 16:15 ` [PATCH 4/5] sched/deadline: Don't charge core-sched forced idle to the DL servers Fernand Sieber
2026-11-24 8:07 ` Karl Mehltretter
2026-11-24 9:40 ` Fernand Sieber [this message]
2026-11-24 9:40 ` [PATCH 1/2] sched/deadline: Keep forced idle uncharged when a sibling ends it Fernand Sieber
2026-11-24 9:40 ` [PATCH 2/2] selftests/sched: Let the FIFO task block in cs_dl_server_test Fernand Sieber
2026-11-24 9:46 ` [PATCH 4/5] sched/deadline: Don't charge core-sched forced idle to the DL servers Fernand Sieber
2026-11-12 16:15 ` [PATCH 5/5] selftests/sched: Add a core-sched forced-idle DL server test Fernand Sieber
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=cover.1795510960.git.sieberf@amazon.com \
--to=sieberf@amazon.com \
--cc=bristot@kernel.org \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=dwmw@amazon.co.uk \
--cc=fmubeen@amazon.de \
--cc=hborghor@amazon.de \
--cc=joelagnelf@nvidia.com \
--cc=joshdon@google.com \
--cc=juri.lelli@redhat.com \
--cc=karataev@amazon.com \
--cc=kmehltretter@gmail.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=lshahed@amazon.de \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=nh-open-source@amazon.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=shuah@kernel.org \
--cc=stable@vger.kernel.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