Re: SMP syncronization on AMD processors (broken?)

From: Linus Torvalds (torvalds_at_osdl.org)
Date: 10/06/05

  • Next message: Ragnar Hojland Espinosa: "Re: what's next for the linux kernel?"
    Date:	Thu, 6 Oct 2005 08:46:41 -0700 (PDT)
    To: Andrey Savochkin <saw@sawoct.com>
    
    

    On Thu, 6 Oct 2005, Andrey Savochkin wrote:
    >
    > I start to wonder about existing mainstream code, presumably bug-free, that
    > uses spinlocks without any problematic restart.

    Actually, a number of cases where we found things to be a problem have
    been converted.

    It _is_ a real-life issue, although with "normal" code it only happens in
    extreme machines (NUMA with tons of nodes). It's fairly fundamental in
    NUMA, and in many ways you do absolutely _not_ want fairness, because it's
    much better to take the lock locally a hundred times (almost free) than it
    is to bounce it back-and-forth between two nodes a hundred times (very
    expensive).

    Fairness is often very expensive indeed.

    But places where unfairness can be a problem have been converted to things
    like RCU, which allows concurrent operations more gracefully.

    And sometimes the answer is just "don't do that then".

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


  • Next message: Ragnar Hojland Espinosa: "Re: what's next for the linux kernel?"

    Relevant Pages

    • Re: [RFC] scheduler: improve SMP fairness in CFS
      ... Instead of an explicit system-wide fairness invariant, ... If we guarantee that the load on CPU X does not differ from the load on CPU %N by more than some small constant, then we know that the system is fairly balanced. ... the global rw_lock, and task migrations. ... I agree they can be problems on NUMA, but I'd argue they are not on SMPs. ...
      (Linux-Kernel)
    • RE: [patch] prefer TSC over PM Timer
      ... and my measurements show it in the same performance ballpark as TSC. ... wouldn't local apic timer be a lot better for NUMA too? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: topology api confusion
      ... I suspect that it's supposed to be unconditionally included at ... Since it doesnt look like this will be resolved by 2.6.13 and NUMA is ... overriding all the ppc64 specific functions when NUMA is on. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • RE: Industry db benchmark result on recent 2.6 kernels
      ... it had a good estimate of 9ms on my test system. ... old finding may not apply any more for the new kernel. ... you definitely want to check this out on your large numa box. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: topology api confusion
      ... I suspect that it's supposed to be unconditionally included at ... > overriding all the ppc64 specific functions when NUMA is on. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)