mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Pingfan Liu <piliu@redhat.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.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>
Subject: Re: [PATCH] sched/deadline: Derive root domain from active cpu in task's cpus_ptr
Date: Mon, 29 Sep 2025 15:53:47 +0200	[thread overview]
Message-ID: <20250929135347.GH3289052@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20250929133602.32462-1-piliu@redhat.com>

On Mon, Sep 29, 2025 at 09:36:02PM +0800, Pingfan Liu wrote:
> When testing kexec-reboot on a 144 cpus machine with
> isolcpus=managed_irq,domain,1-71,73-143 in kernel command line, I
> encounter the following bug:
> 
> [   97.114759] psci: CPU142 killed (polled 0 ms)
> [   97.333236] Failed to offline CPU143 - error=-16
> [   97.333246] ------------[ cut here ]------------
> [   97.342682] kernel BUG at kernel/cpu.c:1569!

> [   97.514379] Call trace:
> [   97.516874]  smp_shutdown_nonboot_cpus+0x104/0x128
> [   97.521769]  machine_shutdown+0x20/0x38
> [   97.525693]  kernel_kexec+0xc4/0xf0
> [   97.529260]  __do_sys_reboot+0x24c/0x278
> [   97.533272]  __arm64_sys_reboot+0x2c/0x40

> Tracking down this issue, I found that dl_bw_deactivate() returned
> -EBUSY, which caused sched_cpu_deactivate() to fail on the last CPU.
> When a CPU is inactive, its rd is set to def_root_domain. For an S-state

You mean a blocked task?

> deadline task (in this case, "cppc_fie"), it was not migrated to CPU0,
> and its task_rq() information is stale. As a result, its bandwidth is
> wrongly accounted into def_root_domain during domain rebuild.
> 
> This patch uses the rd from the run queue of still-active CPU to get the
> correct root domain.

That doesn't seem right in general. What if there are multiple root
domains; how does it know which to use?

  reply	other threads:[~2025-09-29 13:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-29 13:36 Pingfan Liu
2025-09-29 13:53 ` Peter Zijlstra [this message]
2025-09-30  1:47   ` Pingfan Liu
2025-09-30  7:20     ` Juri Lelli
2025-09-30  9:04       ` Peter Zijlstra
2025-10-06 10:20         ` Pierre Gondois
     [not found]         ` <45e40d5e-f0b9-4c77-af1e-6ac915518acc@arm.com>
2025-10-06 12:12           ` Juri Lelli
2025-10-10 16:25             ` Pierre Gondois
2025-10-14 13:09               ` Pingfan Liu
2025-10-15  9:35                 ` Juri Lelli
2025-10-16 11:37                   ` Pierre Gondois
2025-10-16 12:17                     ` Pingfan Liu
2025-10-16 14:26                       ` Pierre Gondois
2025-10-16 12:20                   ` Pingfan Liu
2025-09-30  9:03     ` Peter Zijlstra
2025-10-01 13:15       ` Pingfan Liu
2025-09-29 14:37 ` Juri Lelli
2025-09-30  1:43   ` Pingfan Liu

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=20250929135347.GH3289052@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --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=piliu@redhat.com \
    --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

all inboxes | Powered by JetHome®