lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1402474451.3798.44.camel@x220>
Date:	Wed, 11 Jun 2014 10:14:11 +0200
From:	Paul Bolle <pebolle@...cali.nl>
To:	Waiman Long <Waiman.Long@...com>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...nel.org>
Cc:	hpa@...or.com, konrad.wilk@...cle.com,
	torvalds@...ux-foundation.org, davej@...hat.com, jeremy@...p.org,
	paulmck@...ux.vnet.ibm.com, raghavendra.kt@...ux.vnet.ibm.com,
	tglx@...utronix.de, oleg@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [tip:locking/core] x86, locking/rwlocks: Enable qrwlocks on x86

On Fri, 2014-06-06 at 05:20 -0700, tip-bot for Waiman Long wrote:
> Make x86 use the fair rwlock_t.
> 
> Implement the custom queue_write_unlock() for best performance.

This landed in linux-next yesterday (ie, next-20140610).

> Signed-off-by: Waiman Long <Waiman.Long@...com>
> [peterz: near complete rewrite]
> Signed-off-by: Peter Zijlstra <peterz@...radead.org>
> Cc: Dave Jones <davej@...hat.com>
> Cc: Jeremy Fitzhardinge <jeremy@...p.org>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
> Cc: Linus Torvalds <torvalds@...ux-foundation.org>
> Cc: Oleg Nesterov <oleg@...hat.com>
> Cc: Raghavendra K T <raghavendra.kt@...ux.vnet.ibm.com>
> Cc: "Paul E.McKenney" <paulmck@...ux.vnet.ibm.com>
> Cc: linux-kernel@...r.kernel.org
> Cc: x86@...nel.org
> Link: http://lkml.kernel.org/n/tip-r1xuzmdysvuhl3h86n5fbxi7@git.kernel.org
> Signed-off-by: Ingo Molnar <mingo@...nel.org>
>[...]
> diff --git a/arch/x86/include/asm/qrwlock.h b/arch/x86/include/asm/qrwlock.h
> new file mode 100644
> index 0000000..70f46f0
> --- /dev/null
> +++ b/arch/x86/include/asm/qrwlock.h
> @@ -0,0 +1,17 @@
> +#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)

X86_OOSTORE was removed in v3.14, see commit 09df7c4c8097 ("x86: Remove
CONFIG_X86_OOSTORE"). So the first test can be removed here, as it will
always be true. Should I submit the trivial, but probably untested,
patch to do that or do you prefer to do that yourself?

> +#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 */

Thanks,


Paul Bolle

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ