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.
Reviewed-by: Christian Loehle <christian.loehle@arm.com>
Acked-by: Juri Lelli <juri.lelli@redhat.com>
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 a3003b0f4522..8ba01a0ce36b 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -3354,7 +3354,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