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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 23 Feb 2010 00:55:04 -0800 (PST)
From:	David Rientjes <rientjes@...gle.com>
To:	Miao Xie <miaox@...fujitsu.com>
cc:	Nick Piggin <npiggin@...e.de>, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, Lee Schermerhorn <lee.schermerhorn@...com>
Subject: Re: [regression] cpuset,mm: update tasks' mems_allowed in time
 (58568d2)

On Tue, 23 Feb 2010, Miao Xie wrote:

> >>  /*
> >> @@ -1391,11 +1393,10 @@ static void cpuset_attach(struct cgroup_subsys *ss, struct cgroup *cont,
> >>  
> >>  	if (cs == &top_cpuset) {
> >>  		cpumask_copy(cpus_attach, cpu_possible_mask);
> >> -		to = node_possible_map;
> >>  	} else {
> >>  		guarantee_online_cpus(cs, cpus_attach);
> >> -		guarantee_online_mems(cs, &to);
> >>  	}
> >> +	guarantee_online_mems(cs, &to);
> >>  
> >>  	/* do per-task migration stuff possibly for each in the threadgroup */
> >>  	cpuset_attach_task(tsk, &to, cs);
> > 
> > Do we need to set cpus_attach to cpu_possible_mask?  Why won't 
> > cpu_active_mask suffice?
> 
> If we set cpus_attach to cpu_possible_mask, we needn't do anything for tasks in the top_cpuset when
> doing cpu hotplug. If not, we will update cpus_allowed of all tasks in the top_cpuset.
> 

Cpu hotplug sets top_cpuset's cpus_allowed to cpu_active_mask by default, 
regardless of what was onlined or offlined.  cpus_attach in the context of 
your patch (in cpuset_attach()) passes cpu_possible_mask to 
set_cpus_allowed_ptr() if the task is being attached to top_cpuset, my 
question was why don't we pass cpu_active_mask instead?  In other words, I 
think we should do

	cpumask_copy(cpus_attach, cpu_active_mask);

when attached to top_cpuset like my patch did.
--
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