lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 24 May 2012 13:58:56 +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-24 at 15:14 +0530, Srivatsa S. Bhat wrote:

> Sorry, my bad, I hadn't considered that. Thanks for pointing it out!
> 
> So, I am wondering how we ought to deal with CPU hotplug for tasks attached
> to the root cpuset..

By not doing anything at all. If a task is in the root set it is
supposed to behave as it cpusets don't exist.

> Considering tasks attached to the root cpuset, if a cpu present in a task's
> cpus_allowed mask goes offline, it should be removed from that mask right?

Nope, that shouldn't happen. We only reset the mask if all cpus in the
affinity mask go away. This is where task affinity and cpusets differ.

> And if that cpu comes back online, it should not be put back to the task's
> cpus_allowed mask (just like we don't put back cpus in non-root cpusets).

Online shouldn't ever change anything.

> Is the above understanding correct?

Nope.

> In the current kernel, during cpu hotplug, we don't touch cpus_allowed mask
> of the tasks attached to the root cpuset at all.. Whereas we update the
> cpus_allowed mask of tasks belonging to non-root cpusets, during cpu offline.
> 
> So, is this differentiation intended?

Yes, although arguably the cpuset case is 'weird' in that it came later
and didn't mirror the cpu affinity semantics.

Tasks aren't attached to the root cpuset, they live there because
there's no other place to be when you don't use cpusets. This very much
means that tasks in the root set should behave as if cpusets didn't
exist.



--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ