From: Mel Gorman <mgorman@techsingularity.net>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Steven Rostedt <rostedt@goodmis.org>,
Seiji Nishikawa <snishika@redhat.com>,
Mian Yousaf Kaukab <ykaukab@suse.de>,
LKML <linux-kernel@vger.kernel.org>,
Mel Gorman <mgorman@techsingularity.net>
Subject: [PATCH 3/3] sched/rt: Treat migrate-disabled tasks as pushable if RT_PUSH_IPI is disabled
Date: Tue, 10 Nov 2026 23:20:57 +0000 [thread overview]
Message-ID: <20261110232057.4144723-4-mgorman@techsingularity.net> (raw)
In-Reply-To: <20261110232057.4144723-1-mgorman@techsingularity.net>
Migrate-disabled tasks are not accounted as pushable to avoid spurious
IPIs. When RT_PUSH_IPI is unavailable or disabled then there are no IPIs so
pull_rt_task() must find rqs with off-cpu migrate-disabled tasks. It then
can push the running task away allowing the migrate-disabled task to run.
Restore the original accounting of migrate-disabled tasks as pushable if
RT_PUSH_IPI is disabled.
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
---
kernel/sched/rt.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index cc77683f4897..bb640278d30e 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -396,8 +396,12 @@ static inline void rt_queue_pull_task(struct rq *rq)
static void enqueue_pushable_task(struct rq *rq, struct task_struct *p)
{
- if (p->nr_cpus_allowed <= 1 || is_migration_disabled(p))
+ if (p->nr_cpus_allowed <= 1)
return;
+#ifdef HAVE_RT_PUSH_IPI
+ if (sched_feat(RT_PUSH_IPI) && is_migration_disabled(p))
+ return;
+#endif
plist_del(&p->pushable_tasks, &rq->rt.pushable_tasks);
plist_node_init(&p->pushable_tasks, p->prio);
--
2.55.0
prev parent reply other threads:[~2026-11-10 23:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 23:20 [PATCH 0/3] Reduce spurious RT_PUSH_IPI storms Mel Gorman
2026-11-10 23:20 ` [PATCH 1/3] sched/rt: Do not account migrate-disabled tasks as pushable Mel Gorman
2026-11-12 9:46 ` Steven Rostedt
2026-11-12 11:38 ` Mel Gorman
2026-11-10 23:20 ` [PATCH 2/3] sched/rt: Check eligibility of pushable task in one place Mel Gorman
2026-11-10 23:20 ` Mel Gorman [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=20261110232057.4144723-4-mgorman@techsingularity.net \
--to=mgorman@techsingularity.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=snishika@redhat.com \
--cc=vincent.guittot@linaro.org \
--cc=ykaukab@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.