Re: [PATCH v8 00/15] futex: Add support task local hash maps.
From: Sebastian Andrzej Siewior
Date: Wed Feb 05 2025 - 03:49:54 EST
On 2025-02-04 16:14:05 [+0100], Peter Zijlstra wrote:
> On Mon, Feb 03, 2025 at 02:59:20PM +0100, Sebastian Andrzej Siewior wrote:
> > futex: Decrease the waiter count before the unlock operation.
> > futex: Prepare for reference counting of the process private hash end
> > of operation.
> > futex: Re-evaluate the hash bucket after dropping the lock
> > futex: Introduce futex_get_locked_hb().
>
> I must admit to not being a fan of these patches. I find them very hard
> to review.
>
> In part because while you go stick _put() on various things, there is no
> corresponding _get(), things like futex_hash() become an implicit get
> -- this took a while to figure out.
There is one get in futex_hash() and multiple puts depending on the
context usually after dropping the hash bucket lock.
> I tried tying the whole get/put to the hb variable itself, using the
> cleanup stuff. The patch is pretty massive because fairly large chunks
> of code got re-indented, but perhaps the final result is clearer, not
> sure.
… Let me find some time and dig through this.
Sebastian