Re: [PATCH 5/8] cpu: cpu-hotplug deadlock

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Oleg Nesterov
Date: Tuesday, April 29, 2008 - 7:33 am

On 04/29, Gautham R Shenoy wrote:

While the patch itself is very clean and understandable, I can't understand
the changelog ;)

Could you explain what is the semantics difference? The current code allows
read-in-write recursion too.

The only difference I can see is that now cpu_hotplug_begin() doesn't rely
on cpu_add_remove_lock any longer (currently the caller must hold this lock),
but this (good) change is not documented.


waitqueue_active() ?


Please note that wake_up() and wake_up_all() doesn't differ here, because
cpu_hotplug_begin() use prepare_to_wait(), not prepare_to_wait_exclusive().
I'd suggest to change cpu_hotplug_begin(), and use wake_up() for both
cases.

(actually, since write-locks should be very rare, perhaps we don't need
 2 wait_queues ?)

Oleg.

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

Messages in current thread:
[PATCH 1/8] lockdep: fix recursive read lock validation, Gautham R Shenoy, (Tue Apr 29, 5:57 am)
[PATCH 2/8] lockdep: reader-in-writer recursion, Gautham R Shenoy, (Tue Apr 29, 5:58 am)
[PATCH 3/8] lockdep: fix fib_hash softirq inversion, Gautham R Shenoy, (Tue Apr 29, 6:00 am)
[PATCH 4/8] net: af_netlink: deadlock, Gautham R Shenoy, (Tue Apr 29, 6:01 am)
[PATCH 5/8] cpu: cpu-hotplug deadlock, Gautham R Shenoy, (Tue Apr 29, 6:02 am)
[PATCH 6/8] lockdep: annotate cpu_hotplug, Gautham R Shenoy, (Tue Apr 29, 6:02 am)
[PATCH 7/8] cpu_hotplug: Introduce try_get_online_cpus(), Gautham R Shenoy, (Tue Apr 29, 6:03 am)
Re: [PATCH 1/8] lockdep: fix recursive read lock validation, Bart Van Assche, (Tue Apr 29, 6:16 am)
Re: Hans Reiser, reiserfs developer, linux-os (Dick Johnson), (Tue Apr 29, 6:19 am)
Re: [PATCH 5/8] cpu: cpu-hotplug deadlock, Oleg Nesterov, (Tue Apr 29, 7:33 am)
Re: [PATCH 3/8] lockdep: fix fib_hash softirq inversion, Peter Zijlstra, (Tue Apr 29, 7:45 am)
Re: [PATCH 1/8] lockdep: fix recursive read lock validation, Bart Van Assche, (Tue Apr 29, 8:03 am)
Re: [PATCH 5/8] cpu: cpu-hotplug deadlock, Peter Zijlstra, (Tue Apr 29, 8:09 am)
Re: [PATCH 1/8] lockdep: fix recursive read lock validation, Bart Van Assche, (Tue Apr 29, 9:03 am)
Re: [PATCH 1/8] lockdep: fix recursive read lock validation, Bart Van Assche, (Tue Apr 29, 9:29 am)
Re: [PATCH 5/8] cpu: cpu-hotplug deadlock, Oleg Nesterov, (Tue Apr 29, 9:45 am)
Re: [PATCH 1/8] lockdep: fix recursive read lock validation, Peter Zijlstra, (Tue Apr 29, 10:04 am)
Re: [PATCH 5/8] cpu: cpu-hotplug deadlock, Peter Zijlstra, (Tue Apr 29, 10:31 am)
Re: [PATCH 1/8] lockdep: fix recursive read lock validation, Bart Van Assche, (Tue Apr 29, 10:45 am)
Re: [PATCH 1/8] lockdep: fix recursive read lock validation, Peter Zijlstra, (Tue Apr 29, 10:58 am)
Re: [PATCH 5/8] cpu: cpu-hotplug deadlock, Gautham R Shenoy, (Tue Apr 29, 10:37 pm)
Re: [PATCH 5/8] cpu: cpu-hotplug deadlock, Oleg Nesterov, (Wed Apr 30, 4:43 am)