Commit 479972ef authored by Pingfan Liu's avatar Pingfan Liu Committed by Peter Zijlstra
Browse files

sched/deadline: Remove unnecessary comment in dl_add_task_root_domain()



The comments above dl_get_task_effective_cpus() and
dl_add_task_root_domain() already explain how to fetch a valid
root domain and protect against races. There's no need to repeat
this inside dl_add_task_root_domain(). Remove the redundant comment
to keep the code clean.

No functional change.

Signed-off-by: default avatarPingfan Liu <piliu@redhat.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: default avatarJuri Lelli <juri.lelli@redhat.com>
Acked-by: default avatarWaiman Long <longman@redhat.com>
Link: https://patch.msgid.link/20251125032630.8746-2-piliu@redhat.com
parent 0f61b186
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -3162,20 +3162,11 @@ void dl_add_task_root_domain(struct task_struct *p)
		return;
	}

	/*
	 * Get an active rq, whose rq->rd traces the correct root
	 * domain.
	 * Ideally this would be under cpuset reader lock until rq->rd is
	 * fetched.  However, sleepable locks cannot nest inside pi_lock, so we
	 * rely on the caller of dl_add_task_root_domain() holds 'cpuset_mutex'
	 * to guarantee the CPU stays in the cpuset.
	 */
	dl_get_task_effective_cpus(p, msk);
	cpu = cpumask_first_and(cpu_active_mask, msk);
	BUG_ON(cpu >= nr_cpu_ids);
	rq = cpu_rq(cpu);
	dl_b = &rq->rd->dl_bw;
	/* End of fetching rd */

	raw_spin_lock(&dl_b->lock);
	__dl_add(dl_b, p->dl.dl_bw, cpumask_weight(rq->rd->span));