Re: [PATCH v12 10/21] futex: Introduce futex_q_lockptr_lock()

From: Sebastian Andrzej Siewior
Date: Fri May 16 2025 - 08:18:29 EST


On 2025-05-08 16:06:28 [-0300], André Almeida wrote:
> > +/**
> > + * futex_hash_get - Get an additional reference for the local hash.
> > + * @hb: ptr to the private local hash.
> > + *
> > + * Obtain an additional reference for the already obtained hash bucket. The
> > + * caller must already own an reference.
> > + */
>
> This comment should come with patch 6 (that creates the function) or patch
> 14 (that implements the function).

It is too late for that.

> > --- a/kernel/futex/futex.h
> > +++ b/kernel/futex/futex.h
> > @@ -183,6 +183,7 @@ struct futex_q {
> > union futex_key *requeue_pi_key;
> > u32 bitset;
> > atomic_t requeue_state;
> > + bool drop_hb_ref;
>
> This new member needs a comment:
>
> * @drop_hb_ref: True if an extra reference was acquired by a pi operation,
> and needs an extra put()

This is done as of today.

Sebastian