Re: [PATCH 2/3] x86/intel_rdt: Return state to default on umount

From: Thomas Gleixner
Date: Tue Nov 15 2016 - 08:38:46 EST


On Fri, 11 Nov 2016, Fenghua Yu wrote:
> @@ -801,6 +801,7 @@ static void rmdir_all_sub(void)
> {
> struct rdtgroup *rdtgrp, *tmp;
> struct task_struct *p, *t;
> + int cpu;
>
> /* move all tasks to default resource group */
> read_lock(&tasklist_lock);
> @@ -819,10 +820,19 @@ static void rmdir_all_sub(void)
> /* Remove each rdtgroup other than root */
> if (rdtgrp == &rdtgroup_default)
> continue;
> +
> + /* Give any CPUs back to the default group */
> + cpumask_or(&rdtgroup_default.cpu_mask,
> + &rdtgroup_default.cpu_mask, &rdtgrp->cpu_mask);

That's a pointless exercise. We can simply copy cpu_online_mask to the
default group mask and be done with it. I'll fix that up.

Thanks,

tglx