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]
Message-ID: <20120515014042.GA9774@linux.vnet.ibm.com>
Date:	Mon, 14 May 2012 18:40:42 -0700
From:	Nishanth Aravamudan <nacc@...ux.vnet.ibm.com>
To:	David Rientjes <rientjes@...gle.com>
Cc:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>,
	a.p.zijlstra@...llo.nl, mingo@...nel.org, pjt@...gle.com,
	paul@...lmenage.org, akpm@...ux-foundation.org, rjw@...k.pl,
	nacc@...ibm.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 v3 5/5] cpusets, suspend: Save and restore cpusets during
 suspend/resume

On 14.05.2012 [17:37:50 -0700], David Rientjes wrote:
> On Mon, 14 May 2012, Srivatsa S. Bhat wrote:
> 
> > diff --git a/kernel/cpuset.c b/kernel/cpuset.c
> > index 0723183..671bf26 100644
> > --- a/kernel/cpuset.c
> > +++ b/kernel/cpuset.c
> > @@ -93,6 +93,13 @@ struct cpuset {
> >  
> >  	unsigned long flags;		/* "unsigned long" so bitops work */
> >  	cpumask_var_t cpus_allowed;	/* CPUs allowed to tasks in cpuset */
> > +
> > +	/*
> > +	 * used to save cpuset's cpus_allowed mask during suspend and restore
> > +	 * it during resume.
> > +	 */
> > +	cpumask_var_t suspend_cpus_allowed;
> > +
> >  	nodemask_t mems_allowed;	/* Memory Nodes allowed to tasks */
> >  
> >  	struct cpuset *parent;		/* my parent */
> 
> I see what you're doing with this and think it will fix the problem that 
> you're trying to address, but I think it could become much more general 
> to just the suspend case: if an admin sets a cpuset to have cpus 4-6, for 
> example, and cpu 5 goes offline, then I believe the cpuset should once 
> again become 4-6 if cpu 5 comes back online.  So I think this should be 
> implemented like mempolicies are which save the user intended nodemask 
> that may become restricted by cpuset placement but will be rebound if the 
> cpuset includes the intended nodes.

Heh, please read the thread at
http://marc.info/?l=linux-kernel&m=133615922717112&w=2 ... subject is
"[PATCH v2 0/7] CPU hotplug, cpusets: Fix issues with cpusets handling
upon CPU hotplug". That was effectively the same solution Srivatsa
originally posted. But after lengthy discussions with PeterZ and others,
it was decided that suspend/resume is a special case where it makes
sense to save "policy" but that generally cpu/memory hotplug is a
destructive operation and nothing is required to be retained (that
certain policies are retained is unfortunately now expected, but isn't
guaranteed for cpusets, at least).

> If that's done, then it takes care of the suspend case as well and adds 
> generic cpu hotplug support, not just for suspend/resume.

Yeah ... but that's not the intent here (to add generic cpu hotplug
support).

Srivatsa, perhaps a reference to some summary of why it's not good to
support the general hotplug case would have been good in 0/5?

Thanks,
Nish


-- 
Nishanth Aravamudan <nacc@...ibm.com>
IBM Linux Technology Center

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