The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 6.12.y 0/2] Please backport wake_q drain follow-ups
@ 2026-08-06  9:32 Simon Liebold
  2026-08-06  9:32 ` [PATCH 6.12.y 1/2] locking/mutex: Make mutex::wait_lock irq safe Simon Liebold
  2026-08-06  9:32 ` [PATCH 6.12.y 2/2] sched/wake_q: Add helper to call wake_up_q after unlock with preemption disabled Simon Liebold
  0 siblings, 2 replies; 4+ messages in thread
From: Simon Liebold @ 2026-08-06  9:32 UTC (permalink / raw)
  To: Thomas Gleixner, Darren Hart, Davidlohr Bueso, André Almeida,
	Will Deacon, Waiman Long, Boqun Feng, Simon Liebold, John Stultz,
	Peter Zijlstra, Ingo Molnar, linux-kernel, stable

Hi, please backport the following two commits to the 6.12.y stable tree.

After commit 4a0779145781 ("locking/rtmutex: Make sure we wake anything on the
wake_q when we release the lock->wait_lock") landed in v6.12.96, we observed a
fio null_blk throughput regression (128K / iodepth=1 / numjobs=64, Graviton3 /
m7g.16xlarge), because that commit makes the rt_mutex / mutex release path run
an unconditional

    preempt_disable();
    raw_spin_unlock(lock);
    wake_up_q(wake_q);
    preempt_enable();

drain on every release, even though wake_q is only ever populated on the
ww_mutex path.

After checking why we are not seeing this in mainline, I found that we are
missing commit abfdccd6af2b ("sched/wake_q: Add helper to call wake_up_q after
unlock with preemption disabled") in 6.12.y. Even though it looks like a
refactor, it adds an if (wake_q), gating the wake queue drain.

Commit 5ec58525a1f1 ("locking/mutex: Make mutex::wait_lock irq safe") is
backported to make the former apply cleanly.

Simon

John Stultz (1):
  sched/wake_q: Add helper to call wake_up_q after unlock with
    preemption disabled

Juri Lelli (1):
  locking/mutex: Make mutex::wait_lock irq safe

 include/linux/sched/wake_q.h | 34 ++++++++++++++++++++++++++++++++++
 kernel/futex/pi.c            |  5 +----
 kernel/locking/mutex.c       | 26 ++++++++++----------------
 kernel/locking/rtmutex.c     | 32 +++++---------------------------
 kernel/locking/ww_mutex.h    | 21 +++++++++++----------
 5 files changed, 61 insertions(+), 57 deletions(-)


base-commit: 833291ee77846538926c990bcb468f6f54e9af50
-- 
2.50.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-06 17:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-06  9:32 [PATCH 6.12.y 0/2] Please backport wake_q drain follow-ups Simon Liebold
2026-08-06  9:32 ` [PATCH 6.12.y 1/2] locking/mutex: Make mutex::wait_lock irq safe Simon Liebold
2026-08-06  9:32 ` [PATCH 6.12.y 2/2] sched/wake_q: Add helper to call wake_up_q after unlock with preemption disabled Simon Liebold
2026-08-06 17:49   ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox