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]
Date:	Thu, 9 Apr 2015 20:28:38 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Kirill Tkhai <ktkhai@...allels.com>
Cc:	linux-kernel@...r.kernel.org, Oleg Nesterov <oleg@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...hat.com>, Michal Hocko <mhocko@...e.cz>,
	Rik van Riel <riel@...hat.com>,
	Ionut Alexa <ionut.m.alexa@...il.com>,
	Peter Hurley <peter@...leysoftware.com>,
	Kirill Tkhai <tkhai@...dex.ru>
Subject: Re: [PATCH] exit: Use read lock for do_notify_parent() instead of
 write lock

On Thu, Apr 09, 2015 at 08:59:08PM +0300, Kirill Tkhai wrote:

I've not really read your email yet, however:

> Also, in the future we may think about new rwlock primitive, which atomically
> drops write lock and acquires read lock. Something like this for example:
> 
> include/asm-generic/qrwlock.h:
> static inline void queue_reduce_locked_write_to_read(struct qrwlock *lock)
> {
> 	smp_mb__before_atomic();
> 	atomic_add(_QR_BIAS - _QW_LOCKED, &lock->cnts);
> }

we actually have that for the rwsems: downgrade_write(). So the
consistent naming would be: queue_downgrade_write().
--
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