From: Steven Rostedt <rostedt@goodmis.org>
To: Chaosheng Qu <chaosheng.qu.linux@gmail.com>
Cc: Martin King <martin3kx@gmail.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Thorsten Leemhuis <regressions@leemhuis.info>,
regressions@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-rt-users@vger.kernel.org
Subject: Re: [PATCH] sched/rt: push a queued task when its priority is boosted
Date: Mon, 30 Nov 2026 09:16:03 -0500 [thread overview]
Message-ID: <20261130091603.51ee966b@gandalf.local.home> (raw)
In-Reply-To: <179526068763.97100.12205093734161349836@gmail.com>
On Sat, 21 Nov 2026 19:31:27 +0800
Chaosheng Qu <chaosheng.qu.linux@gmail.com> wrote:
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index 85303add7..db93bfff7 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -2499,6 +2499,19 @@ prio_changed_rt(struct rq *rq, struct task_struct *p, u64 oldprio)
> */
> if (p->prio < rq->donor->prio)
> resched_curr(rq);
> +
> + /*
> + * A (PI) boost can make @p the highest priority
> + * pushable task on this rq while it still cannot run
> + * here, because the running task is of equal or higher
> + * priority. If @p's affinity excludes the CPUs that
> + * become idle, the pull side cannot pick it and it may
> + * stay queued until the current task schedules out.
> + * Trigger a push for the new priority.
> + */
> + if (oldprio > p->prio && p->nr_cpus_allowed > 1 &&
> + p->prio >= rq->donor->prio)
> + rt_queue_push_tasks(rq);
> }
> }
Nit, it should be an if/else statement:
if (p->prio < rq->donor->prio) {
resched_curr(rq);
} else if (oldprio > p->prio && p->nr_cpus_allowed > 1) {
/*
* The task priority increased but not more than the
* current running task. There may be other CPUs that this
* task can now run on. Let's check for that.
*/
rt_queue_push_tasks(rq);
}
-- Steve
next prev parent reply other threads:[~2026-11-30 14:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 21:12 [REGRESSION] sched/rt: NO_RT_PUSH_IPI causes multi-second PI-boost starvation in pro-audio workloads (dd29c017aed6) Martin King
2026-08-14 22:36 ` Steven Rostedt
2026-09-03 11:27 ` Thorsten Leemhuis
2026-09-03 13:20 ` Steven Rostedt
2026-10-15 6:19 ` Chaosheng Qu
2026-10-15 12:46 ` Steven Rostedt
2026-11-21 11:31 ` [PATCH] sched/rt: push a queued task when its priority is boosted Chaosheng Qu
2026-11-24 12:08 ` Sebastian Andrzej Siewior
2026-11-28 5:30 ` Chaosheng Qu
2026-11-30 14:16 ` Steven Rostedt [this message]
2026-10-17 12:14 ` [PATCH] sched/rt: queue a push when a queued RT task " Chaosheng Qu
2026-10-17 14:44 ` Kayra Cizmeci
2026-10-18 3:42 ` Chaosheng Qu
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=20261130091603.51ee966b@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=chaosheng.qu.linux@gmail.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=martin3kx@gmail.com \
--cc=peterz@infradead.org \
--cc=regressions@leemhuis.info \
--cc=regressions@lists.linux.dev \
/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®