Re: [PATCH 6/6] smp: Cleanup smp_call_function*()
From: Peter Zijlstra
Date: Thu Jun 18 2020 - 12:26:48 EST
On Wed, Jun 17, 2020 at 11:51:07PM -0700, Christoph Hellwig wrote:
> Much better. Although if we touch all the callers we might as well
> pass the csd as the argument to the callback, as with that we can
> pretty trivially remove the private data field later.
My plan was to introduce a new function and type and convert
smp_call_function_async() callers over to that. The csd as it exists is
useful for the regular smp_call_function*() API.
> Btw, it seems the callers that don't have the CSD embedded into the
> containing structure seems to be of these two kinds:
>
> - reimplementing on_each_cpumask (mostly because they can be called
> from irq context)
These are fairly special purpose constructs; and they come at the cost
of extra per-cpu storage and they have the limitiation that they must
wait for completion of the first before they can be used again.
> - reimplenenting smp_call_function_single because they want
> to sleep instead of busy wait
These are atrocious pieces of crap (the x86/msr ones), the reason it was
done is because virt :/