Messages in this thread | | | From | Nick Piggin <> | Subject | Re: [PATCH 1/7] x86-64: introduce fast variant of smp_call_function_single() | Date | Mon, 17 Mar 2008 13:24:31 +1100 |
| |
On Monday 17 March 2008 09:58, Jeremy Fitzhardinge wrote: > Jens Axboe wrote: > > On Fri, Mar 14 2008, Jeremy Fitzhardinge wrote: > >> Jens Axboe wrote: > >>> rom: Nick Piggin <npiggin@suse.de> > >> > >> Why is this necessary? How is smp_call_function_single slow? > > > > Because it's completely serialized by the call_lock spinlock. > > Hm, yes. Would it be possible to implement smp_call_function_mask in a > generic way to avoid that? Turn the static structure into a per-cpu > request list?
Not really. The common cases (that I can see) are either call all, or call one. In the call all case, you would have to touch every other CPU's request list, and that's not really any better than what I've done in my patchest for that.
There would presumably be some cutoff where it makes more sense to queue events to the percpu IPI lists if you are only sending to a few CPUs. That would be trivial to implement, but... what are the use-cases for that? The big one that I really know of is user TLB shootdown, but that has its own vector anyway.
| |