lkml.org 
[lkml]   [2013]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/11] cpuset: update cs->real_{cpus,mems}_allowed when config changes
On Wed, Aug 21, 2013 at 05:59:32PM +0800, Li Zefan wrote:
...
> + cpuset_for_each_descendant_pre(cp, pos_css, cs) {
> + struct cpuset *parent = parent_cs(cs);
> + struct cpumask *new_cpus = trialcs->real_cpus_allowed;
> +
> + cpumask_and(new_cpus, cp->cpus_allowed,
> + parent->real_cpus_allowed);
> +
> + /*
> + * Skip the whole subtree if the cpumask is not changed, unless
> + * it's empty, and in this case we need to update tasks to take
> + * on an ancestor's cpumask.

Something like the following would be clearer?

"Skip the whole subtree if the cpumask remains the same and isn't
empty. If empty, we need..."

> @@ -931,7 +941,6 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs,
> {
> struct ptr_heap heap;
> int retval;
> - int is_load_balanced;
>
> /* top_cpuset.cpus_allowed tracks cpu_online_mask; it's read-only */
> if (cs == &top_cpuset)
> @@ -966,17 +975,15 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs,
> if (retval)
> return retval;
>
> - is_load_balanced = is_sched_load_balance(trialcs);
> -
> mutex_lock(&callback_mutex);
> cpumask_copy(cs->cpus_allowed, trialcs->cpus_allowed);
> mutex_unlock(&callback_mutex);
>
> - update_tasks_cpumask_hier(cs, true, &heap);
> + update_cpumasks_hier(cs, trialcs, &heap);
>
> heap_free(&heap);
>
> - if (is_load_balanced)
> + if (is_sched_load_balance(cs))
> rebuild_sched_domains_locked();

Hmmm... Maybe the above change needs some explanation in the patch
description?

Ooh and @update_root params are gone. Maybe nice to note that in the
description too?

Thanks.

--
tejun


\
 
 \ /
  Last update: 2013-08-21 16:01    [W:0.142 / U:1.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site