Grant Grundler wrote: > On Thu, Sep 08, 2005 at 08:39:15AM +1000, Paul Mackerras wrote: > >>Grant Grundler writes: >> >> >>>I would argue it more obvious. People looking at the code >>>are immediately going to realize it was a deliberate choice to >>>not use a spinlock. >> >>It achieves exactly the same effect as spin_lock/spin_unlock, just >>more verbosely. :) > > > Not exactly identical. spin_try_lock() doesn't attempt to acquire > the lock and thus force exclusive access to the cacheline. > Other than that, I agree with you. > > I don't see a problem with being verbose here since putting > a spinlock around something that's already atomic (assignment) > even caught Andrew's attention. I reverted the patch to use a spinlock and added a comment. How does this look? -- Brian King eServer Storage I/O IBM Linux Technology Center