From: Shrikanth Hegde <sshegde@linux.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>,
Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
jstultz@google.com, stultz@google.com
Subject: Re: [bisected][mainline]Kernel warnings at kernel/sched/cpudeadline.c:219
Date: Wed, 8 Oct 2025 15:47:16 +0530 [thread overview]
Message-ID: <5a248390-ddaa-4127-a58a-794d0d70461a@linux.ibm.com> (raw)
In-Reply-To: <20251008095039.GG3245006@noisy.programming.kicks-ass.net>
On 10/8/25 3:20 PM, Peter Zijlstra wrote:
> On Wed, Oct 08, 2025 at 07:41:10AM +0530, Venkat Rao Bagalkote wrote:
>> Greetings!!!
>>
>>
>> IBM CI has reported a kernel warnings while running CPU hot plug operation
>> on IBM Power9 system.
>>
>>
>> Command to reproduce the issue:
>>
>> drmgr -c cpu -r -q 1
>>
>>
>> Git Bisect is pointing to below commit as the first bad commit.
>
> Does something like this help?
>
> (also, for future reference, please don't line wrap logs, it makes them
> very hard to read)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 198d2dd45f59..65f37bfcd661 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -8328,6 +8328,7 @@ static inline void sched_set_rq_offline(struct rq *rq, int cpu)
> BUG_ON(!cpumask_test_cpu(cpu, rq->rd->span));
> set_rq_offline(rq);
> }
> + dl_server_stop(&rq->fair_server);
> rq_unlock_irqrestore(rq, &rf);
> }
>
Hi Peter. Thanks for looking into it.
I was able to repro this issue on my system. This above diff didn't help. I still see the warning.
I have to understand this dl server stuff still.
So not sure if my understanding is completely correct.
Looks like the hrtimer is firing after the cpu was removed. The warn on hit only with
drmgr. Regular hotplug with chcpu doesn;t hit. That's because drmgr changes the cpu_present mask.
and warning is hit with it.
maybe during drmgr, the dl server gets started again? Maybe that's why above patch it didn't work.
Will see and understand this bit more.
Also, i tried this below diff which fixes it. Just ignore the hrtimer if the cpu is offline.
Does this makes sense?
---
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 615411a0a881..a342cf5e4624 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -1160,6 +1160,9 @@ static enum hrtimer_restart dl_server_timer(struct hrtimer *timer, struct sched_
scoped_guard (rq_lock, rq) {
struct rq_flags *rf = &scope.rf;
+ if (!cpu_online(rq->cpu))
+ return HRTIMER_NORESTART;
+
if (!dl_se->dl_throttled || !dl_se->dl_runtime)
return HRTIMER_NORESTART;
next prev parent reply other threads:[~2025-10-08 10:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-08 2:11 [bisected][mainline]Kernel warnings at kernel/sched/cpudeadline.c:219 Venkat Rao Bagalkote
2025-10-08 9:50 ` Peter Zijlstra
2025-10-08 10:17 ` Shrikanth Hegde [this message]
2025-10-08 11:13 ` Peter Zijlstra
2025-10-08 18:09 ` Shrikanth Hegde
2025-10-09 8:00 ` Peter Zijlstra
2025-10-09 9:47 ` Shrikanth Hegde
2025-10-09 11:49 ` Peter Zijlstra
2025-10-09 11:54 ` Marek Szyprowski
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=5a248390-ddaa-4127-a58a-794d0d70461a@linux.ibm.com \
--to=sshegde@linux.ibm.com \
--cc=jstultz@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=peterz@infradead.org \
--cc=stultz@google.com \
--cc=venkat88@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