Commit 55939cf2 authored by Gabriele Monaco's avatar Gabriele Monaco Committed by Tejun Heo
Browse files

cgroup/cpuset: Rename update_unbound_workqueue_cpumask() to update_isolation_cpumasks()



update_unbound_workqueue_cpumask() updates unbound workqueues settings
when there's a change in isolated CPUs, but it can be used for other
subsystems requiring updated when isolated CPUs change.

Generalise the name to update_isolation_cpumasks() to prepare for other
functions unrelated to workqueues to be called in that spot.

[longman: Change the function name to update_isolation_cpumasks()]

Acked-by: default avatarFrederic Weisbecker <frederic@kernel.org>
Acked-by: default avatarWaiman Long <longman@redhat.com>
Signed-off-by: default avatarGabriele Monaco <gmonaco@redhat.com>
Signed-off-by: default avatarWaiman Long <longman@redhat.com>
Reviewed-by: default avatarChen Ridong <chenridong@huaweicloud.com>
Reviewed-by: default avatarChen Ridong <chenridong@huawei.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent d245698d
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1393,7 +1393,7 @@ static bool partition_xcpus_del(int old_prs, struct cpuset *parent,
	return isolcpus_updated;
}

static void update_unbound_workqueue_cpumask(bool isolcpus_updated)
static void update_isolation_cpumasks(bool isolcpus_updated)
{
	int ret;

@@ -1557,7 +1557,7 @@ static int remote_partition_enable(struct cpuset *cs, int new_prs,
	list_add(&cs->remote_sibling, &remote_children);
	cpumask_copy(cs->effective_xcpus, tmp->new_cpus);
	spin_unlock_irq(&callback_lock);
	update_unbound_workqueue_cpumask(isolcpus_updated);
	update_isolation_cpumasks(isolcpus_updated);
	cpuset_force_rebuild();
	cs->prs_err = 0;

@@ -1598,7 +1598,7 @@ static void remote_partition_disable(struct cpuset *cs, struct tmpmasks *tmp)
	compute_excpus(cs, cs->effective_xcpus);
	reset_partition_data(cs);
	spin_unlock_irq(&callback_lock);
	update_unbound_workqueue_cpumask(isolcpus_updated);
	update_isolation_cpumasks(isolcpus_updated);
	cpuset_force_rebuild();

	/*
@@ -1667,7 +1667,7 @@ static void remote_cpus_update(struct cpuset *cs, struct cpumask *xcpus,
	if (xcpus)
		cpumask_copy(cs->exclusive_cpus, xcpus);
	spin_unlock_irq(&callback_lock);
	update_unbound_workqueue_cpumask(isolcpus_updated);
	update_isolation_cpumasks(isolcpus_updated);
	if (adding || deleting)
		cpuset_force_rebuild();

@@ -2011,7 +2011,7 @@ static int update_parent_effective_cpumask(struct cpuset *cs, int cmd,
							tmp->delmask);

	spin_unlock_irq(&callback_lock);
	update_unbound_workqueue_cpumask(isolcpus_updated);
	update_isolation_cpumasks(isolcpus_updated);

	if ((old_prs != new_prs) && (cmd == partcmd_update))
		update_partition_exclusive_flag(cs, new_prs);
@@ -3029,7 +3029,7 @@ static int update_prstate(struct cpuset *cs, int new_prs)
	else if (isolcpus_updated)
		isolated_cpus_update(old_prs, new_prs, cs->effective_xcpus);
	spin_unlock_irq(&callback_lock);
	update_unbound_workqueue_cpumask(isolcpus_updated);
	update_isolation_cpumasks(isolcpus_updated);

	/* Force update if switching back to member & update effective_xcpus */
	update_cpumasks_hier(cs, &tmpmask, !new_prs);