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: <28585.1274279766@redhat.com>
Date:	Wed, 19 May 2010 15:36:06 +0100
From:	David Howells <dhowells@...hat.com>
To:	Michel Lespinasse <walken@...gle.com>
Cc:	dhowells@...hat.com,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Mike Waychison <mikew@...gle.com>,
	Suleiman Souhlal <suleiman@...gle.com>,
	Ying Han <yinghan@...gle.com>
Subject: Re: [PATCH 09/10] x86 rwsem: down_read_critical implementation

Michel Lespinasse <walken@...gle.com> wrote:

> The basic properties that have been true so far still hold:
> - RWSEM_ACTIVE_READ_BIAS  & RWSEM_ACTIVE_MASK == 1
> - RWSEM_ACTIVE_WRITE_BIAS & RWSEM_ACTIVE_MASK == 1
> - RWSEM_WAITING_BIAS      & RWSEM_ACTIVE_MASK == 0
> - RWSEM_ACTIVE_WRITE_BIAS < 0 and RWSEM_WAITING_BIAS < 0
> 
> A new property is introduced: RWSEM_ACTIVE_WRITE_BIAS is set to be
> 'more negative' than RWSEM_WAITING_BIAS. This way, even the first writer
> will set the rwsem count to be < RWSEM_WAITING_BIAS and down_read_critical()
> can make use of this to determine if there are any active writers.
> 
> Signed-off-by: Michel Lespinasse <walken@...gle.com>

Acked-by: David Howells <dhowells@...hat.com>
--
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