lkml.org 
[lkml]   [2013]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2013-10-15 22:41    [W:0.072 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site