[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1337850827.9783.77.camel@laptop>
Date: Thu, 24 May 2012 11:13:47 +0200
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: "Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
Cc: mingo@...nel.org, pjt@...gle.com, paul@...lmenage.org,
akpm@...ux-foundation.org, rjw@...k.pl, nacc@...ibm.com,
rientjes@...gle.com, paulmck@...ux.vnet.ibm.com,
tglx@...utronix.de, seto.hidetoshi@...fujitsu.com, tj@...nel.org,
mschmidt@...hat.com, berrange@...hat.com,
nikunj@...ux.vnet.ibm.com, vatsa@...ux.vnet.ibm.com,
liuj97@...il.com, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org
Subject: Re: [PATCH v5 4/5] cpusets: Update tasks' cpus_allowed mask upon
updates to root cpuset
On Thu, 2012-05-17 at 22:33 +0530, Srivatsa S. Bhat wrote:
> + /*
> + * Restore only the top_cpuset because it has to track
> + * cpu_active_mask always.
> + * (We don't need to do anything if we come here during resume
> + * from suspend, since top_cpuset.cpus_allowed will already be
> + * equal to cpu_active_mask.)
> + */
> + if (root == &top_cpuset && !cpumask_equal(root->cpus_allowed,
> + cpu_active_mask)) {
> + mutex_lock(&callback_mutex);
> + cpumask_copy(root->cpus_allowed, cpu_active_mask);
> + mutex_unlock(&callback_mutex);
> + update_tasks_cpumask(root, NULL);
> + }
This looks absolutely broken.
Suppose I set an explicit cpu affinity mask on my task, which per not
using cpusets is in the root group.
If I then do a hotplug cycle, I'll find my affinity mask is lost.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists