lkml.org 
[lkml]   [2009]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: Q: smp.c && barriers (Was: [PATCH 1/4] generic-smp: remove single ipi fallback for smp_call_function_many())
    From
    Date
    On Wed, 2009-02-18 at 09:14 -0800, Linus Torvalds wrote:
    >
    > On Wed, 18 Feb 2009, Ingo Molnar wrote:
    > >
    > > an off-list comment pointed out this piece of information as
    > > well:
    > >
    > > http://www.sandpile.org/ia32/coherent.htm
    > >
    > > A WRMSR to one of the x2APIC MSRs (0000_0800h...0000_0BFFh) is
    > > not guaranteed to be serializing.
    > >
    > > So i suspect we should just enclose it in smp_mb() pairs to make
    > > sure it's a full barrier in both directions?
    >
    > Why would we care about "both directions"?

    on x86 we don't need in both directions.

    >
    > I think putting an sfence _before_ the wrmsr (and not even all of them -
    > just put it in front of the "send IPI" sequence) should be fine. Any other
    > ordering sounds like just unnecessary overhead to me.

    For x2apic ipi's, we should use a serializing instruction or a "mfence"
    instruction. "sfence" will not help in this scenario.

    thanks,
    suresh



    \
     
     \ /
      Last update: 2009-02-18 19:39    [W:4.148 / U:0.100 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site