lkml.org 
[lkml]   [2007]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 0/24] make atomic_read() behave consistently across all architectures
    Date
    On Friday 17 August 2007 05:42, Linus Torvalds wrote:
    > On Fri, 17 Aug 2007, Paul Mackerras wrote:
    > > I'm really surprised it's as much as a few K. I tried it on powerpc
    > > and it only saved 40 bytes (10 instructions) for a G5 config.
    >
    > One of the things that "volatile" generally screws up is a simple
    >
    > volatile int i;
    >
    > i++;

    But for atomic_t people use atomic_inc() anyways which does this correctly.
    It shouldn't really matter for atomic_t.

    I'm worrying a bit that the volatile atomic_t change caused subtle code
    breakage like these delay read loops people here pointed out.
    Wouldn't it be safer to just re-add the volatile to atomic_read()
    for 2.6.23? Or alternatively make it asm(), but volatile seems more
    proven.

    -Andi
    -
    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: 2007-08-17 10:57    [W:2.052 / U:0.068 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site