- Subject: Re: [PATCH 1/9] cpu: Introduce clear_tasks_mm_cpumask() helper
- From: Anton Vorontsov <anton.vorontsov@xxxxxxxxxx>
- Date: Fri, 4 May 2012 18:47:14 -0700
- Cc: Oleg Nesterov <oleg@xxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxxx>, Mike Frysinger <vapier@xxxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, Richard Weinberger <richard@xxxxxx>, Paul Mundt <lethal@xxxxxxxxxxxx>, Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>, KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>, John Stultz <john.stultz@xxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, uclinux-dist-devel@xxxxxxxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, user-mode-linux-devel@xxxxxxxxxxxxxxxxxxxxx, linaro-kernel@xxxxxxxxxxxxxxxx, patches@xxxxxxxxxx, linux-mm@xxxxxxxxx
- In-reply-to: <20120426165911.00cebd31.akpm@linux-foundation.org>
- References: <20120423070641.GA27702@lizard> <20120423070736.GA30752@lizard> <20120426165911.00cebd31.akpm@linux-foundation.org>
- User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Apr 26, 2012 at 04:59:11PM -0700, Andrew Morton wrote:
[...]
> > so its not like new tasks will ever get this cpu set in
> > + * their mm mask. -- Peter Zijlstra
> > + * Thus, we may use rcu_read_lock() here, instead of grabbing
> > + * full-fledged tasklist_lock.
> > + */
> > + rcu_read_lock();
> > + for_each_process(p) {
> > + struct task_struct *t;
> > +
> > + t = find_lock_task_mm(p);
> > + if (!t)
> > + continue;
> > + cpumask_clear_cpu(cpu, mm_cpumask(t->mm));
> > + task_unlock(t);
> > + }
> > + rcu_read_unlock();
> > +}
>
> It is good that this code exists under CONFIG_HOTPLUG_CPU. Did you
> check that everything works correctly with CONFIG_HOTPLUG_CPU=n?
Yeah, only the code under CONFIG_HOTPLUG_CPU calls the function, so
it should be all fine.
Thanks!
--
Anton Vorontsov
Email: cbouatmailru@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux OMAP]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]