From: "tip-bot2 for Hao Jia" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Hao Jia <jiahao1@lixiang.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
K Prateek Nayak <kprateek.nayak@amd.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: sched/core] sched/core: Remove double update_rq_clock() in __set_cpus_allowed_ptr_locked()
Date: Tue, 11 Nov 2025 11:37:18 -0000 [thread overview]
Message-ID: <176286103844.498.12254783433336302431.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20251029093655.31252-1-jiahao.kernel@gmail.com>
The following commit has been merged into the sched/core branch of tip:
Commit-ID: e40cea333e60c548e047eaddec6ca48c6632424b
Gitweb: https://git.kernel.org/tip/e40cea333e60c548e047eaddec6ca48c6632424b
Author: Hao Jia <jiahao1@lixiang.com>
AuthorDate: Wed, 29 Oct 2025 17:36:55 +08:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Tue, 11 Nov 2025 12:33:38 +01:00
sched/core: Remove double update_rq_clock() in __set_cpus_allowed_ptr_locked()
Since commit d4c64207b88a ("sched: Cleanup the sched_change NOCLOCK usage"),
update_rq_clock() is called in do_set_cpus_allowed() -> sched_change_begin()
to update the rq clock. This results in a duplicate call update_rq_clock()
in __set_cpus_allowed_ptr_locked().
While holding the rq lock and before calling do_set_cpus_allowed(),
there is nothing that depends on an updated rq_clock.
Therefore, remove the redundant update_rq_clock() in
__set_cpus_allowed_ptr_locked() to avoid the warning about double
rq clock updates.
Fixes: d4c64207b88a ("sched: Cleanup the sched_change NOCLOCK usage")
Signed-off-by: Hao Jia <jiahao1@lixiang.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: K Prateek Nayak <kprateek.nayak@amd.com>
Link: https://patch.msgid.link/20251029093655.31252-1-jiahao.kernel@gmail.com
---
kernel/sched/core.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 67b5f2f..68f19aa 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2999,8 +2999,6 @@ static int __set_cpus_allowed_ptr_locked(struct task_struct *p,
unsigned int dest_cpu;
int ret = 0;
- update_rq_clock(rq);
-
if (kthread || is_migration_disabled(p)) {
/*
* Kernel threads are allowed on online && !active CPUs,
prev parent reply other threads:[~2025-11-11 11:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 9:36 [PATCH] " Hao Jia
2025-10-30 4:04 ` K Prateek Nayak
2025-10-30 9:14 ` Peter Zijlstra
2025-11-11 11:37 ` tip-bot2 for Hao Jia [this message]
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=176286103844.498.12254783433336302431.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=jiahao1@lixiang.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=peterz@infradead.org \
--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®