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 - 9:45 am

On 04/29, Peter Zijlstra wrote:

Well, yes I see, but... Ugh, I have a a blind spot here ;)

why this makes any difference from the semantics POV ? why it is bad
to hold the mutex throughout the "full hotplug thing" ?


Yes. but let's suppose we have the single wait_queue, this doesn't make
any difference from the correctness POV, no?

To clarify: I am not arguing! this makes sense, but I'm asking to be sure
I didn't miss a subtle reason why do we "really" need 2 wait_queues.

Also. Let's suppose we have both read- and write- waiters, and cpu_hotplug_done()
does wake_up(writer_queue). It is possible that another reader comes and does
get_online_cpus() and increments .refcount first. After that, cpu_hotplug
is "opened" for the read-lock, but other read-waiters continue to sleep, and
the final put_online_cpus() wakes up write-waiters only. Yes, this all is
correct, but not "symmetrical", and leads to the question "do we really need
2 wait_queues" again.

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)