[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOtvUMfgAGBXx-nvFbMHywYGLmKfmbpcQajddoGYA+B22vLOiw@mail.gmail.com>
Date: Tue, 1 May 2012 14:26:48 +0300
From: Gilad Ben-Yossef <gilad@...yossef.com>
To: Paul Mackerras <paulus@...ba.org>
Cc: linux-kernel@...r.kernel.org, Rusty Russell <rusty@...tcorp.com.au>
Subject: Re: get/put_online_cpus documentation wrong?
On Tue, May 1, 2012 at 3:12 AM, Paul Mackerras <paulus@...ba.org> wrote:
>
> In Documentation/cpu-hotplug.txt it says:
>
> " #include <linux/cpu.h>
> get_online_cpus() and put_online_cpus():
>
> The above calls are used to inhibit cpu hotplug operations. While the
> cpu_hotplug.refcount is non zero, the cpu_online_mask will not change.
> If you merely need to avoid cpus going away, you could also use
> preempt_disable() and preempt_enable() for those sections.
> Just remember the critical section cannot call any
> function that can sleep or schedule this process away."
I *think* the critical section remark here is referring to using
preempt_disable/enable(),
rather then the use of get/put_online_cpus().
Gilad
--
Gilad Ben-Yossef
Chief Coffee Drinker
gilad@...yossef.com
Israel Cell: +972-52-8260388
US Cell: +1-973-8260388
http://benyossef.com
"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
-- Jean-Baptiste Queru
--
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