Re: [PATCH 01/13] [VOYAGER] x86: add {safe,hard}_smp_processor_idto smp_ops

From: James Bottomley
Date: Sun Mar 08 2009 - 13:23:31 EST


On Sun, 2009-03-08 at 10:15 -0700, Jeremy Fitzhardinge wrote:
> James Bottomley wrote:
> > Not having apics, Voyager can't use the default apic implementation of
> > these, it has to read from a special port in the VIC to get the
> > processor ID, so abstract these functions in smp_ops to allow voyager
> > to live simultaneously with the apic code.
> >
>
> These aren't performance-sensitive at all, are they? smp_ops is not
> subject to patching/inlining optimisations happen to more hotpath pvops.

No more than the function pointer indirection of smp_call_function().
Fortunately, the hard version is called in very few places, so the
overhead is minimal.

> Is safe_smp_processor_id needed at all? It's only got two callers, and
> x86-64 just implements it as smp_processor_id().

I can't see a reason, no. If you look at voyager it uses the same
function for both, but x86 seems to have extra gunk in the safe path, so
I didn't feel entitled to remove it.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/