linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: peterz@infradead.org
Cc: linux-kernel@vger.kernel.org, anna-maria@linutronix.de,
	vbabka@suse.cz, mgorman@techsingularity.net, mhocko@suse.com,
	linux-mm@kvack.org
Subject: Re: kcompactd hotplug fail
Date: Thu, 10 Sep 2020 16:30:24 +0200	[thread overview]
Message-ID: <87ft7pk8lb.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20200910141006.GA1362448@hirez.programming.kicks-ass.net>

On Thu, Sep 10 2020 at 16:10, peterz wrote:
> While playing with hotplug, I ran into the below:
>
> [ 2305.676384] ------------[ cut here ]------------
> [ 2305.681543] WARNING: CPU: 1 PID: 15 at kernel/sched/core.c:1924 __set_cpus_allowed_ptr+0x1bd/0x230
> [ 2305.821454]  kcompactd_cpu_online+0xa1/0xb0
>
> Given:
>
> static int __init kcompactd_init(void)
> {
> 	...
> 	ret = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN,
> 					"mm/compaction:online",
> 					kcompactd_cpu_online, NULL);
>
> and:
>
>
> 	CPUHP_AP_ONLINE_DYN,
> 	CPUHP_AP_ONLINE_DYN_END		= CPUHP_AP_ONLINE_DYN + 30,
> 	CPUHP_AP_X86_HPET_ONLINE,
> 	CPUHP_AP_X86_KVM_CLK_ONLINE,
> 	CPUHP_AP_ACTIVE,
>
> this is somewhat expected behaviour.
>
> It tries and set the compaction affinity to include the newly onlined
> CPU before it is marked active and that's a no-no.
>
> Ideally the kcompactd notifier is ran after AP_ACTIVE, not before.

Indeed. So we need steps post ACTIVE which we did not want to have in
the first place :)

Thanks,

        tglx




  reply	other threads:[~2020-09-10 14:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10 14:10 peterz
2020-09-10 14:30 ` Thomas Gleixner [this message]
2020-09-10 14:37 ` peterz
2020-09-10 14:50   ` peterz

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=87ft7pk8lb.fsf@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=anna-maria@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=peterz@infradead.org \
    --cc=vbabka@suse.cz \
    /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