[lkml]   [2001]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] i386 rw_semaphores fix

    On Tue, 10 Apr 2001, David Howells wrote:
    > Here's a patch that fixes RW semaphores on the i386 architecture. It is very
    > simple in the way it works.

    XADD only works on Pentium+.

    That's no problem if we make this SMP-specific - I doubt anybody actually
    uses SMP on i486's even if the machines exist, as I think they all had
    special glue logic that Linux would have trouble with anyway. But the
    advantages of being able to use one generic kernel that works on plain UP
    i386 machines as well as SMP P6+ machines is big enough that I would want
    to be able to say "CONFIG_X86_GENERIC" + "CONFIG_SMP".

    Even if it would be noticeably slower (ie a fallback to a spinlock might
    be perfectly ok).

    If you do this, I woul dsuggest having asm-i386/{rwsem.h|rwsem-xadd.h},
    and just having a

    #ifndef CONFIG_XADD
    #include <asm/rwsem.h>
    #include <asm/rwsem-xadd.h>

    (And adding "CONFIG_XADD" to the list of generated optimization
    configuration options in arch/i386/, of course).

    That way we don't make the semaphore.h file even more unreadable.


    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:25    [W:0.021 / U:16.996 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site