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] [day] [month] [year] [list]
Date:	Fri, 13 Apr 2007 15:49:06 +0100
From:	David Howells <dhowells@...hat.com>
To:	Eric Dumazet <dada1@...mosbay.com>
Cc:	Nick Piggin <npiggin@...e.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andi Kleen <ak@...e.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Linux Memory Management List <linux-mm@...ck.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [patch] generic rwsems 

Eric Dumazet <dada1@...mosbay.com> wrote:

> If space considerations are that important, we could then reserve one bit
> for the 'wait_lock spinlock'

That makes life quite a bit more tricky, though it does have the advantage
that it closes the reader-jumping-writer window I mentioned.

> Another possibility to save space would be to move wait_lock/wait_list
> outside of rw_semaphore, in a hashed global array.

I suspect moving wait_list out would be a bad idea.  The ordering of things in
the list is very important.  You need to perform several operations on the
list, all of which would be potentially slower:

 (1) glance at the first element of the list to see what sort of wake up to do

 (2) iteration of the list when waking up multiple readers

 (3) seeing if the list is empty (so you know that there's no more contention)

Moving the spinlock out, on the other hand, might be worth it to cut down on
cacheline bouncing some more...

David
-
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