Re: write_unlock: replace clear_bit with byte store

Christoph Lameter
2005-04-28T20:53:11Z

On Thu, 28 Apr 2005, David Mosberger wrote:

> I'm unsure if it's a good idea to reduce the counter size.

We can still accomodate 2^24 = 16 million concurrent readers.

> Independent of that: using a name like "y" in a macro is bound to
> cause name collisions so it's a big no-no. Then why not declare
> "y" as a "volatile u8 *" so you can avoid the explicit smp_wmb()?
> This is ia64-specific code after all.

I thought that a memory barrier was needed to insure that the clearing of
the lock becomes visible after changes done in the critical section?

y is defined in its own block.

May be better do inline asm with an .nta store?