[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87zfl5q5gi.ffs@tglx>
Date: Sun, 08 Dec 2024 21:34:37 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Koichiro Den <koichiro.den@...onical.com>, linux-kernel@...r.kernel.org
Cc: peterz@...radead.org
Subject: Re: [PATCH] cpu/hotplug: ensure the starting section runs fully
regardless of target
On Sat, Dec 07 2024 at 23:47, Koichiro Den wrote:
> static int take_cpu_down(void *_param)
> {
> struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
> - enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
> int err, cpu = smp_processor_id();
>
> /* Ensure this CPU doesn't handle any more interrupts. */
> @@ -1285,8 +1284,9 @@ static int take_cpu_down(void *_param)
>
> /*
> * Invoke the former CPU_DYING callbacks. DYING must not fail!
> + * Regardless of st->target, it must run through to CPUHP_AP_OFFLINE.
> */
> - cpuhp_invoke_callback_range_nofail(false, cpu, st, target);
> + cpuhp_invoke_callback_range_nofail(false, cpu, st, CPUHP_AP_OFFLINE);
This is really the wrong place. This want's to be enforced at the sysfs
interface already and reject writes which are between AP_OFFLINE and
AP_ONLINE.
It's utterly confusing to write a particular target and then magically
end up at some other state.
Thanks,
tglx
Powered by blists - more mailing lists