[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131015151851.GK3141@htj.dyndns.org>
Date:	Tue, 15 Oct 2013 11:18:51 -0400
From:	Tejun Heo <tj@...nel.org>
To:	Li Zefan <lizefan@...wei.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	cgroups <cgroups@...r.kernel.org>
Subject: Re: [PATCH v2 03/12] cpuset: update cs->effective_{cpus,mems} when
 config changes
On Fri, Oct 11, 2013 at 05:50:04PM +0800, Li Zefan wrote:
> +	cpuset_for_each_descendant_pre(cp, pos_css, cs) {
> +		struct cpuset *parent = parent_cs(cp);
> +		struct cpumask *new_cpus = trialcs->effective_cpus;
> +
> +		cpumask_and(new_cpus, cp->cpus_allowed,
> +			    parent->effective_cpus);
So, @trial_cs is only passed in to use its ->effective_cpus as
temporary buffer?  If allocating from inside the function isn't an
option, wouldn't it be better to pass in cpumask * instead of the
whole trial_cs and explicitly note that the argument is used as a temp
var?
...
> +	cpuset_for_each_descendant_pre(cp, pos_css, cs) {
> +		struct cpuset *parent = parent_cs(cp);
> +		nodemask_t *new_mems = &trialcs->effective_mems;
> +
> +		nodes_and(*new_mems, cp->mems_allowed,
> +			  parent->effective_mems);
Ditto.
Thanks.
-- 
tejun
--
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
 
