mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Simon Liebold <simonlie@amazon.de>
To: "Thomas Gleixner" <tglx@linutronix.de>,
	"Darren Hart" <dvhart@infradead.org>,
	"Davidlohr Bueso" <dave@stgolabs.net>,
	"André Almeida" <andrealmeid@igalia.com>,
	"Will Deacon" <will@kernel.org>,
	"Waiman Long" <longman@redhat.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Simon Liebold" <simonlie@amazon.de>,
	"John Stultz" <jstultz@google.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Ingo Molnar" <mingo@redhat.com>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: [PATCH 6.12.y 0/2] Please backport wake_q drain follow-ups
Date: Thu, 6 Aug 2026 09:32:57 +0000	[thread overview]
Message-ID: <20260806093259.2778358-1-simonlie@amazon.de> (raw)

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


             reply	other threads:[~2026-08-06  9:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06  9:32 Simon Liebold [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260806093259.2778358-1-simonlie@amazon.de \
    --to=simonlie@amazon.de \
    --cc=andrealmeid@igalia.com \
    --cc=boqun.feng@gmail.com \
    --cc=dave@stgolabs.net \
    --cc=dvhart@infradead.org \
    --cc=jstultz@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®