lkml.org 
[lkml]   [2004]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC] Refcounting of objects part of a lockfree collection
    On Wed, Jul 14, 2004 at 10:08:00AM -0700, Greg KH wrote:
    > On Wed, Jul 14, 2004 at 02:27:58PM +0530, Ravikiran G Thirumalai wrote:
    > > might be a bit yucky to assume atomic_t internals, but it is just one header
    > > file :) <ducks>
    >
    > I still think you need to fix this, manipulating atomic_t variables by
    > hand is not always guaranteed to work on all arches, from what I
    > remember.

    AFAICS, the hash-locked refcounting grabs a spin lock for all
    operations on the atomic_t. Any reason why that should not be safe ?
    Of course, I can't see why we can't have two versions of the
    reference counter depending on __HAVE_ARCH_CMPXCHG. Kiran ?

    >
    > And what arches do not support cmpxchg? How does this change affect the
    > performance of them?

    mips64, smp arm ?? ;-)

    With a hashed lock, it should not be all that bad in low-end SMPs.
    Besides we already use such a thing in gettimeofday implementation
    with a global lock. However this is a valid issue and performance #s
    from those arch users would be useful.

    Thanks
    Dipankar
    -
    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: 2005-03-22 14:04    [W:0.021 / U:0.472 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site