Re: [RFC PATCH v1] stop_machine: Add stop_housekeeping_cpuslocked()
From: Peter Zijlstra
Date: Wed Dec 18 2024 - 12:28:09 EST
On Wed, Dec 18, 2024 at 07:15:31PM +0200, Costa Shulyupin wrote:
> Which synchronizations do these functions require instead of stop_machine?
*sigh*, so you're asking us to do your homework?
But clearly you're not realizing the scope of the thing: stop_machine()
serializes against every preempt_disable() region in the entire kernel.
So you're telling me there isn't a single preempt_disable() region in
the kernel that depends on being before stop_machine() in its entirety?
I know for a fact I've written some in the past 20 years -- what I don't
know if any of them still live and are still relying on it, because I've
also added synchronize_rcu_sched(), which later became synchronize_rcu()
which implies the same, in various parts of the hotplug machinery.
Anyway, without you doing some proper analysis, your patches are going
exactly nowhere.