[lkml]   [2002]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch] generic-pidhash-2.5.36-D4, BK-curr
    Ingo Molnar wrote:
    > On Fri, 20 Sep 2002, Oleg Drokin wrote:
    > > > + if (cmpxchg(&map->page, NULL, page))
    > > > + free_page(page);
    > >
    > > Note that this piece breaks compilation for every arch that does not
    > > have cmpxchg implementation.
    > > This is the case with x86 (with CONFIG_X86_CMPXCHG undefined, e.g. i386),
    > > ARM, CRIS, m68k, MIPS, MIPS64, PARISC, s390, SH, sparc32, UML (for x86).
    > we need a cmpxchg() function in the generic library, using a spinlock.
    > Then every architecture can enhance the implementation if it wishes to.

    That would be good, but wouldn't we then need a special per-arch
    "cmpxchngable" type, like atomic_t?

    Seems that just doing compare-and-exchange on a bare page* might force
    some architectures to use a global lock.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:29    [W:0.020 / U:135.604 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site