[lkml]   [2007]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] make atomic_t volatile on all architectures
    On Thu, Aug 09, 2007 at 03:47:57AM -0400, Chris Snook wrote:
    > If they're not doing anything, sure. Plenty of loops actually do some sort
    > of real work while waiting for their halt condition, possibly even work
    > which is necessary for their halt condition to occur, and you definitely
    > don't want to be doing cpu_relax() in this case. On register-rich
    > architectures you can do quite a lot of work without needing to reuse the
    > register containing the result of the atomic_read(). Those are precisely
    > the architectures where barrier() hurts the most.

    I have a problem with this argument. The same loop could be
    using a non-atomic as long as the updaters are serialised. Would
    you suggest that we turn such non-atomics into volatiles too?

    Any loop that's waiting for an external halt condition either
    has to schedule away (which is a barrier) or you'd be busy
    waiting in which case you should use cpu_relax.

    Do you have an example where this isn't the case?

    Visit Openswan at
    Email: Herbert Xu ~{PmV>HI~} <>
    Home Page:
    PGP Key:
    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: 2007-08-09 13:11    [W:0.024 / U:8.420 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site