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: <1430911095.1940.28.camel@stgolabs.net>
Date:	Wed, 06 May 2015 04:18:15 -0700
From:	Davidlohr Bueso <dave@...olabs.net>
To:	Waiman Long <Waiman.Long@...com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
	Jason Low <jason.low2@...com>,
	Scott J Norton <scott.norton@...com>,
	Douglas Hatch <doug.hatch@...com>
Subject: Re: [PATCH v4 1/2] locking/rwsem: reduce spinlock contention in
 wakeup after up_read/up_write

On Thu, 2015-04-30 at 17:12 -0400, Waiman Long wrote:
> In up_write()/up_read(), rwsem_wake() will be called whenever it
> detects that some writers/readers are waiting. The rwsem_wake()
> function will take the wait_lock and call __rwsem_do_wake() to do the
> real wakeup.  For a heavily contended rwsem, doing a spin_lock() on
> wait_lock will cause further contention on the heavily contended rwsem
> cacheline resulting in delay in the completion of the up_read/up_write
> operations.
> 
> This patch makes the wait_lock taking and the call to __rwsem_do_wake()
> optional if at least one spinning writer is present. The spinning
> writer will be able to take the rwsem and call rwsem_wake() later
> when it calls up_write(). With the presence of a spinning writer,
> rwsem_wake() will now try to acquire the lock using trylock. If that
> fails, it will just quit.
> 
> Signed-off-by: Waiman Long <Waiman.Long@...com>
> Suggested-by: Peter Zijlstra (Intel) <peterz@...radead.org>

Reviewed-by: Davidlohr Bueso <dave@...olabs.net>

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