Re: [PATCH 06/11] rwsem: wake queued readers when writer blocks on active read lock

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Michel Lespinasse
Date: Wednesday, August 11, 2010 - 10:02 pm

On Wed, Aug 11, 2010 at 6:24 PM, Tony Luck <tony.luck@intel.com> wrote:

Thanks for the report. FYI, a8618a0e does not depend on 424acaae so it
should be fine if you only revert 424acaae


In arch/ia64/include/asm/rwsem.h I see RWSEM_WAITING_BIAS defined as
-__IA64_UL_CONST(0x0000000100000000)

This makes it a large, positive unsigned value. This is probably
throwing off the rwsem_atomic_update(0, sem) < RWSEM_WAITING_BIAS
comparison in my patch (supposed to be long versus long, but actually
is long versus unsigned long on ia64).

Also, it looks like ia64 uses intrinsics for the atomic accesses, not
asm (that I could see in a 5 minute look around), so maybe one could
just get rid of the __IA64_UL_CONST macros ???

I can not compile or test on ia64, but could you report as to what
happens if you replace the #defines in arch/ia64/include/asm/rwsem.h
with:
#define RWSEM_UNLOCKED_VALUE __IA64_UL_CONST(0x0000000000000000)
#define RWSEM_ACTIVE_BIAS (1L)
#define RWSEM_ACTIVE_MASK (0xffffffffL)
#define RWSEM_WAITING_BIAS (-0x100000000L)
#define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS
#define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)


Cheers,

-- 
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 06/11] rwsem: wake queued readers when writer block ..., Michel Lespinasse, (Mon May 24, 1:31 pm)
Re: [PATCH 06/11] rwsem: wake queued readers when writer b ..., Michel Lespinasse, (Wed Aug 11, 10:02 pm)
Re: [PATCH 06/11] rwsem: wake queued readers when writer b ..., Michel Lespinasse, (Wed Aug 11, 10:09 pm)
Re: [PATCH 06/11] rwsem: wake queued readers when writer b ..., Michel Lespinasse, (Fri Aug 13, 4:48 pm)