From: Hui Su <sh_def@163.com>
To: Mikhail Zaslonko <zaslonko@linux.ibm.com>
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
vschneid@redhat.com, kprateek.nayak@amd.com,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Sashiko <sashiko-bot@kernel.org>,
Heiko Carstens <hca@linux.ibm.com>,
Ilya Leoshkevich <iii@linux.ibm.com>
Subject: Re: [PATCH] sched/deadline: Fix DL server divide-by-zero for inactive CPUs
Date: Sat, 19 Sep 2026 22:45:09 +0900 [thread overview]
Message-ID: <6dbd08d0d0ca288b77dfc7c393898d86.sh_def@163.com> (raw)
In-Reply-To: <c52c9e8c-260e-49a4-a88e-229e0795d07b@linux.ibm.com>
> As for the patch, the same division is unguarded in several other callers
> in deadline.c:
>
> task_non_contending() (this trace)
> inactive_task_timer()
> set_cpus_allowed_dl()
> sched_dl_overflow()
> dl_bw_manage()
>
> Would it make sense to guard inside __dl_sub() and __dl_add() instead?
Hi Mikhail,
Thanks for the report and suggestion.
I agree that handling cpus == 0 in __dl_sub() and __dl_add() is the better
fix. I audited the other callers and reworked the fix in that direction.
I'm planning to post v2 as a two-patch series. The first patch handles
cpus == 0 in the common __dl_sub() and __dl_add() helpers, covering the
other DL bandwidth paths as well as the sched_setscheduler() failure you
reported. The second patch keeps the cpu_active() check for the newer
debugfs DL server interface.
I'm splitting them because the helper issue predates the DL server debugfs
interface, so keeping the generic fix separate also makes the review and
stable backport scope clearer.
I also added targeted tests for the task_non_contending() and
inactive_task_timer() zero-CPU paths, as well as cpus=0/1/2/4 accounting,
root-domain rebuild stress, and the set_cpus_allowed_dl() bandwidth-move
path. All passed on x86_64.
I'll post v2 shortly.
Thanks,
Hui
prev parent reply other threads:[~2026-09-19 13:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 12:32 Hui Su
2026-08-13 8:32 ` Juri Lelli
2026-08-27 10:16 ` Hui Su
2026-09-18 16:26 ` Mikhail Zaslonko
2026-09-19 13:45 ` Hui Su [this message]
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=6dbd08d0d0ca288b77dfc7c393898d86.sh_def@163.com \
--to=sh_def@163.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=hca@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sashiko-bot@kernel.org \
--cc=stable@vger.kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=zaslonko@linux.ibm.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
all inboxes | Powered by JetHome®