Commit d735bab3 authored by Juri Lelli's avatar Juri Lelli Committed by Peter Zijlstra
Browse files

sched/topology: Remove redundant dl_clear_root_domain call



We completely clean and restore root domains bandwidth accounting after
every root domains change, so the dl_clear_root_domain() call in
partition_sched_domains_locked() is redundant.

Remove it.

Signed-off-by: default avatarJuri Lelli <juri.lelli@redhat.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarWaiman Long <llong@redhat.com>
Reviewed-by: default avatarShrikanth Hegde <sshegde@linux.ibm.com>
Reviewed-by: default avatarValentin Schneider <vschneid@redhat.com>
Reviewed-by: default avatarDietmar Eggemann <dietmar.eggemann@arm.com>
Tested-by: default avatarWaiman Long <longman@redhat.com>
Tested-by: default avatarJon Hunter <jonathanh@nvidia.com>
Tested-by: default avatarDietmar Eggemann <dietmar.eggemann@arm.com>
Link: https://lore.kernel.org/r/Z9MRtcX4tz4tcLRR@jlelli-thinkpadt14gen4.remote.csb
parent 2ff899e3
Loading
Loading
Loading
Loading
+1 −14
Original line number Diff line number Diff line
@@ -2720,22 +2720,9 @@ void partition_sched_domains_locked(int ndoms_new, cpumask_var_t doms_new[],
	for (i = 0; i < ndoms_cur; i++) {
		for (j = 0; j < n && !new_topology; j++) {
			if (cpumask_equal(doms_cur[i], doms_new[j]) &&
			    dattrs_equal(dattr_cur, i, dattr_new, j)) {
				struct root_domain *rd;

				/*
				 * This domain won't be destroyed and as such
				 * its dl_bw->total_bw needs to be cleared.
				 * Tasks contribution will be then recomputed
				 * in function dl_update_tasks_root_domain(),
				 * dl_servers contribution in function
				 * dl_restore_server_root_domain().
				 */
				rd = cpu_rq(cpumask_any(doms_cur[i]))->rd;
				dl_clear_root_domain(rd);
			    dattrs_equal(dattr_cur, i, dattr_new, j))
				goto match1;
		}
		}
		/* No match - a current sched domain not in new doms_new[] */
		detach_destroy_domains(doms_cur[i]);
match1: