mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Xie Yuanbin" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Xie Yuanbin <qq570070308@gmail.com>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: sched/core] sched: Make raw_spin_rq_unlock() inline
Date: Mon, 02 Mar 2026 14:50:29 -0000	[thread overview]
Message-ID: <177246302945.1647592.345441883755932235.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260216164950.147617-3-qq570070308@gmail.com>

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     2ad9b46d0a53bcadf2092626fcfd2d96e9b22001
Gitweb:        https://git.kernel.org/tip/2ad9b46d0a53bcadf2092626fcfd2d96e9b22001
Author:        Xie Yuanbin <qq570070308@gmail.com>
AuthorDate:    Tue, 17 Feb 2026 00:49:49 +08:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 02 Mar 2026 15:41:01 +01:00

sched: Make raw_spin_rq_unlock() inline

raw_spin_rq_unlock() is short, and is called in some hot code paths
such as finish_lock_switch.

Make raw_spin_rq_unlock() inline to optimize performance.

Signed-off-by: Xie Yuanbin <qq570070308@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260216164950.147617-3-qq570070308@gmail.com
---
 kernel/sched/core.c  |  5 -----
 kernel/sched/sched.h |  9 ++++++---
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 1e6ebc2..c39e9b4 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -687,11 +687,6 @@ bool raw_spin_rq_trylock(struct rq *rq)
 	}
 }
 
-void raw_spin_rq_unlock(struct rq *rq)
-{
-	raw_spin_unlock(rq_lockp(rq));
-}
-
 /*
  * double_rq_lock - safely lock two runqueues
  */
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index fbde83c..fd36ae3 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1609,15 +1609,18 @@ extern void raw_spin_rq_lock_nested(struct rq *rq, int subclass)
 extern bool raw_spin_rq_trylock(struct rq *rq)
 	__cond_acquires(true, __rq_lockp(rq));
 
-extern void raw_spin_rq_unlock(struct rq *rq)
-	__releases(__rq_lockp(rq));
-
 static inline void raw_spin_rq_lock(struct rq *rq)
 	__acquires(__rq_lockp(rq))
 {
 	raw_spin_rq_lock_nested(rq, 0);
 }
 
+static inline void raw_spin_rq_unlock(struct rq *rq)
+	__releases(__rq_lockp(rq))
+{
+	raw_spin_unlock(rq_lockp(rq));
+}
+
 static inline void raw_spin_rq_lock_irq(struct rq *rq)
 	__acquires(__rq_lockp(rq))
 {

  reply	other threads:[~2026-03-02 14:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-16 16:49 [PATCH v7 0/3] Optimize code generation during context switching Xie Yuanbin
2026-02-16 16:49 ` [PATCH v7 1/3] x86/mm/tlb: Make enter_lazy_tlb() always inline on x86 Xie Yuanbin
2026-03-02 14:50   ` [tip: sched/core] " tip-bot2 for Xie Yuanbin
2026-03-06  5:28   ` tip-bot2 for Xie Yuanbin
2026-02-16 16:49 ` [PATCH v7 2/3] sched: Make raw_spin_rq_unlock() inline Xie Yuanbin
2026-03-02 14:50   ` tip-bot2 for Xie Yuanbin [this message]
2026-03-06  5:28   ` [tip: sched/core] sched/headers: Inline raw_spin_rq_unlock() tip-bot2 for Xie Yuanbin
2026-02-16 16:49 ` [PATCH v7 3/3] sched/core: Make finish_task_switch() and its subfunctions always inline Xie Yuanbin

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=177246302945.1647592.345441883755932235.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=qq570070308@gmail.com \
    --cc=x86@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®