Re: [PATCH v11 1/7] locking/mutex: Remove wakeups from under mutex::wait_lock

From: Peter Zijlstra
Date: Fri Jul 12 2024 - 10:53:06 EST


On Tue, Jul 09, 2024 at 01:31:44PM -0700, John Stultz wrote:
> @@ -405,8 +409,10 @@ ww_mutex_set_context_fastpath(struct ww_mutex *lock, struct ww_acquire_ctx *ctx)
> * die or wound us.
> */
> lock_wait_lock(&lock->base);
> - __ww_mutex_check_waiters(&lock->base, ctx);
> + __ww_mutex_check_waiters(&lock->base, ctx, &wake_q);

preempt_disable()

> unlock_wait_lock(&lock->base);
> +
> + wake_up_q(&wake_q);

preempt_enable();

> }
>
> static __always_inline int