The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Guopeng Zhang <guopeng.zhang@linux.dev>
To: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Valentin Schneider <vschneid@redhat.com>,
	K Prateek Nayak <kprateek.nayak@amd.com>,
	linux-kernel@vger.kernel.org,
	Guopeng Zhang <zhangguopeng@kylinos.cn>
Subject: [PATCH] sched/deadline: Exclude special DL entities from bandwidth moves
Date: Thu, 28 May 2026 14:53:24 +0800	[thread overview]
Message-ID: <20260528065324.1303334-1-guopeng.zhang@linux.dev> (raw)

From: Guopeng Zhang <zhangguopeng@kylinos.cn>

SUGOV special DL entities use fake/unused bandwidth. They are already
excluded from regular DL admission control, affinity admission checks,
rq bandwidth accounting, and root-domain rebuild accounting.

dl_task_needs_bw_move() misses the same exclusion. As a result,
set_cpus_allowed_dl() and cpuset attach may treat a special DL entity as
requiring a root-domain bandwidth move when its affinity mask no longer
intersects the source root domain.

Return false for special DL entities so root-domain bandwidth move
accounting follows the rest of the SUGOV special-entity handling.

Signed-off-by: Guopeng Zhang <zhangguopeng@kylinos.cn>
---
 kernel/sched/deadline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index ddfd6bc63ab1..3653166caa69 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -3142,7 +3142,7 @@ static void set_cpus_allowed_dl(struct task_struct *p,
 bool dl_task_needs_bw_move(struct task_struct *p,
 			   const struct cpumask *new_mask)
 {
-	if (!dl_task(p))
+	if (!dl_task(p) || dl_entity_is_special(&p->dl))
 		return false;
 
 	return !cpumask_intersects(task_rq(p)->rd->span, new_mask);
-- 
2.43.0


             reply	other threads:[~2026-05-28  6:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-28  6:53 Guopeng Zhang [this message]
2026-05-28  9:47 ` [PATCH] sched/deadline: Exclude special DL entities from bandwidth moves Christian Loehle
2026-05-28 12:24 ` Juri Lelli
2026-06-29  5:43   ` Guopeng Zhang

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=20260528065324.1303334-1-guopeng.zhang@linux.dev \
    --to=guopeng.zhang@linux.dev \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=zhangguopeng@kylinos.cn \
    /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