Re: [PATCH] locking/rtmutex: Fix misleading comment
From: Sebastian Andrzej Siewior
Date: Tue Oct 08 2024 - 06:50:12 EST
On 2024-10-08 11:26:06 [+0200], Peter Zijlstra wrote:
>
> Going through the RCU-boost and rtmutex code, I ran into this utterly
> confusing comment. Fix it to avoid confusing future readers.
Correct.
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
> ---
> diff --git a/kernel/locking/rtmutex_api.c b/kernel/locking/rtmutex_api.c
> index a6974d044593..587ede8073c0 100644
> --- a/kernel/locking/rtmutex_api.c
> +++ b/kernel/locking/rtmutex_api.c
> @@ -175,7 +175,7 @@ bool __sched __rt_mutex_futex_unlock(struct rt_mutex_base *lock,
> }
>
> /*
> - * We've already deboosted, mark_wakeup_next_waiter() will
> + * This will deboost, mark_wakeup_next_waiter() will
+ * mark_wakeup_next_waiter() will deboost and
> * retain preempt_disabled when we drop the wait_lock, to
> * avoid inversion prior to the wakeup. preempt_disable()
> * therein pairs with rt_mutex_postunlock().
This could make it obvious that mark_wakeup_next_waiter() does all the
things.
Sebastian