Re: Interference of CPU hotplug on CPU isolation and Real-Time tasks
From: Peter Zijlstra
Date: Mon Dec 09 2024 - 04:57:41 EST
On Mon, Dec 09, 2024 at 09:10:35AM +0200, Costa Shulyupin wrote:
> Questions:
> 1. Why stop_machine() is used during the CPU hotplug?
It is the easiest (and most brutal) serialization scheme to ensure
nothing else will poke at the data you're about to change.
> 2. Is it worth testing using stop_one_cpu(), or would that be the
> wrong approach?
Yes, and yes. That is, I'm fairly sure that just trying it will horribly
break stuff, but it is where you want to end up.
> 3. Do you have any additional recommendations?
Audit the full cpu hotplug stack and determine who all relies on this
'implicit' serialization, then proceed to provide alternative solutions
for these sites. Then, at the very end move to stop_one_cpu().