mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 22:31:32 +00:00
bd01ec1a13
Make x86 use the fair rwlock_t. Implement the custom queue_write_unlock() for best performance. Signed-off-by: Waiman Long <Waiman.Long@hp.com> [peterz: near complete rewrite] Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: Dave Jones <davej@redhat.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> Cc: "Paul E.McKenney" <paulmck@linux.vnet.ibm.com> Cc: linux-kernel@vger.kernel.org Cc: x86@kernel.org Link: http://lkml.kernel.org/n/tip-r1xuzmdysvuhl3h86n5fbxi7@git.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
18 lines
411 B
C
18 lines
411 B
C
#ifndef _ASM_X86_QRWLOCK_H
|
|
#define _ASM_X86_QRWLOCK_H
|
|
|
|
#include <asm-generic/qrwlock_types.h>
|
|
|
|
#if !defined(CONFIG_X86_OOSTORE) && !defined(CONFIG_X86_PPRO_FENCE)
|
|
#define queue_write_unlock queue_write_unlock
|
|
static inline void queue_write_unlock(struct qrwlock *lock)
|
|
{
|
|
barrier();
|
|
ACCESS_ONCE(*(u8 *)&lock->cnts) = 0;
|
|
}
|
|
#endif
|
|
|
|
#include <asm-generic/qrwlock.h>
|
|
|
|
#endif /* _ASM_X86_QRWLOCK_H */
|