Re: [PATCH] lglock: make lg_lock_global() actually lock globally

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Tejun Heo
Date: Thursday, August 26, 2010 - 1:55 am

Hello,

On 08/25/2010 10:00 PM, Linus Torvalds wrote:

We only do stop-machine for cpu downs not ups, so code running w/
preemption disabled is guaranteed that no cpu goes down while it's
running but not the other way around.  There are two ways to achieve
synchronization against cpu up/down operations.  One is explicitly
using get/put_online_cpus() and the other is via cpu notifiers with
proper synchronization.

So, yeah, given that there's no cpu notifier implemented, the use of
for_each_online_cpu for brlock seems fishy to me.  It probably should
use for_each_possible_cpu().

Thanks.

-- 
tejun
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] lglock: make lg_lock_global() actually lock globally, Jonathan Corbet, (Wed Aug 25, 12:28 pm)
Re: [PATCH] lglock: make lg_lock_global() actually lock gl ..., Tejun Heo, (Thu Aug 26, 1:55 am)