Re: Q: smp.c && barriers (Was: [PATCH 1/4] generic-smp: removesingle ipi fallback for smp_call_function_many())

From: Benjamin Herrenschmidt
Date: Thu Feb 19 2009 - 16:51:16 EST


On Thu, 2009-02-19 at 16:06 +0100, Ingo Molnar wrote:
> > So your arch_send_call_function_single_ipi etc need to ensure
> > this, right? Generic code obviously has no idea about how to
> > do it.
>
> The thing is, the most widespread way to send IPIs (x86
> non-x2apic local APIC) does not need any barriers in the generic
> code or elsewhere, because the local APIC is mapped uncached so
> it's implicitly ordered.
>
> So the right solution is to add barriers to those IPI
> implementations that need it. This means that the generic code
> should not have a barrier for IPI sending.

I agree. In fact, our current code should be fine in any case because
our writel() which will be used to generate the IPI has a sync in it
anyway for other reasons.

Cheers,
Ben.


--
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/