lkml.org 
[lkml]   [2006]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Why Semaphore Hardware-Dependent?
    On Tue, 29 Aug 2006, Andi Kleen wrote:

    > On Tuesday 29 August 2006 17:56, Christoph Lameter wrote:
    > > On Tue, 29 Aug 2006, David Howells wrote:
    > >
    > > > Because i386 (and x86_64) can do better by using XADDL/XADDQ.
    > >
    > > And Ia64 would like to use fetchadd....
    >
    > This might be a dumb question, but I would expect even on altix
    > with lots of parallel faulting threads rwsem performance be basically
    > limited by aquiring the cache line and releasing it later to another CPU.

    Correct. However, a cmpxchg may have to acquire that cacheline multiple
    times in a highly contented situation. A fetchadd acquires the cacheline
    only once.

    > Do you really think it will make much difference what particular atomic
    > operation is used? The basic cost of sending the cache line over the
    > interconnect should be all the same, no? And once the cache line is local
    > it should be reasonably fast either way.

    We have long tuned that portion of the code and therefore we are
    skeptical of changes. But if we cannot measure a difference to a
    generic implemenentation then it would be okay.

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

    \
     
     \ /
      Last update: 2006-08-29 19:39    [W:0.021 / U:0.244 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site