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: <20250505071438.C4_3Mx0S@linutronix.de>
Date: Mon, 5 May 2025 09:14:38 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Peter Zijlstra <peterz@...radead.org>
Cc: linux-kernel@...r.kernel.org,
	André Almeida <andrealmeid@...lia.com>,
	Darren Hart <dvhart@...radead.org>,
	Davidlohr Bueso <dave@...olabs.net>, Ingo Molnar <mingo@...hat.com>,
	Juri Lelli <juri.lelli@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Valentin Schneider <vschneid@...hat.com>,
	Waiman Long <longman@...hat.com>,
	Shrikanth Hegde <sshegde@...ux.ibm.com>
Subject: Re: [PATCH v12 15/21] futex: Allow to make the private hash immutable

On 2025-05-02 20:01:54 [+0200], Peter Zijlstra wrote:
> On Wed, Apr 16, 2025 at 06:29:15PM +0200, Sebastian Andrzej Siewior wrote:
> > My initial testing showed that
> > 	perf bench futex hash
> > 
> > reported less operations/sec with private hash. After using the same
> > amount of buckets in the private hash as used by the global hash then
> > the operations/sec were about the same.
> > 
> > This changed once the private hash became resizable. This feature added
> > a RCU section and reference counting via atomic inc+dec operation into
> > the hot path.
> > The reference counting can be avoided if the private hash is made
> > immutable.
> > Extend PR_FUTEX_HASH_SET_SLOTS by a fourth argument which denotes if the
> > private should be made immutable. Once set (to true) the a further
> > resize is not allowed (same if set to global hash).
> > Add PR_FUTEX_HASH_GET_IMMUTABLE which returns true if the hash can not
> > be changed.
> > Update "perf bench" suite.
> 
> Does the below make sense? This changes arg4 into a flags field and uses
> bit0 for immutable.
> 
> (the point where I got upset is where arg4==2 was accepted :-)

I see, it makes sense. It makes sense and leaves room for later.

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ