Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1615228
| From | Laurent Dufour <ldufour@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/5] locking: Introduce range reader/writer lock |
| Date | 2017-04-03 16:20 +0200 |
| Message-ID | <tsaZP-7XD-11@gated-at.bofh.it> (permalink) |
| References | <tigat-2NF-5@gated-at.bofh.it> <tihpT-3Xx-1@gated-at.bofh.it> <tpWeB-62o-5@gated-at.bofh.it> <tq2tH-1Yg-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Le Tue, 28 Mar 2017 09:39:18 -0700,
Davidlohr Bueso <dave@stgolabs.net> a écrit :
> I'll wait to see if there are any more concerns and send a v2 with
> your corrections.
Hi Bavidlohr, I think there is a major issue regarding the task
catching a signal in wait_for_range().
I can see it when a thread is catching a signal, the process deadlock
in exit path.
Let's imagine all these tasks waiting for the complete range lock, so
range doesn't matter:
A get the lock in write
B want the read lock => B->blocking_range=1 (because of A)
C want the write lock => C->blocking_range=2 (A,B)
D want the read lock => D->blocking_range=3 (A,B,C)
=> C catch a signal and exit wait_for_ranges()
A release the lock
=> B->blocking_range=0
=> D->blocking_range=2 (D has not seen C removal)
=> B get the lock
B release the lock
=> D->blocking_range=1
D remains blocked while no one has the lock !
The issue is when removing a task from the interval tree, we
should decrement all the blocking_ranges of the task added to that
range after the one leaving... I can't see an easy fix for that :(
Am I right ?
Cheers,
Laurent.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH 1/5] locking: Introduce range reader/writer lock Laurent Dufour <ldufour@linux.vnet.ibm.com> - 2017-03-28 12:10 +0200
Re: [PATCH 1/5] locking: Introduce range reader/writer lock Davidlohr Bueso <dave@stgolabs.net> - 2017-03-28 18:50 +0200
Re: [PATCH 1/5] locking: Introduce range reader/writer lock "Kirill A. Shutemov" <kirill@shutemov.name> - 2017-03-28 19:10 +0200
Re: [PATCH 1/5] locking: Introduce range reader/writer lock Laurent Dufour <ldufour@linux.vnet.ibm.com> - 2017-03-29 10:40 +0200
Re: [PATCH 1/5] locking: Introduce range reader/writer lock Davidlohr Bueso <dave@stgolabs.net> - 2017-03-29 17:40 +0200
Re: [PATCH 1/5] locking: Introduce range reader/writer lock "Kirill A. Shutemov" <kirill@shutemov.name> - 2017-03-29 17:50 +0200
Re: [PATCH 1/5] locking: Introduce range reader/writer lock Davidlohr Bueso <dave@stgolabs.net> - 2017-03-29 18:20 +0200
Re: [PATCH 1/5] locking: Introduce range reader/writer lock Laurent Dufour <ldufour@linux.vnet.ibm.com> - 2017-04-03 16:20 +0200
Re: [PATCH 1/5] locking: Introduce range reader/writer lock Davidlohr Bueso <dave@stgolabs.net> - 2017-04-03 17:30 +0200
Re: [PATCH 1/5] locking: Introduce range reader/writer lock Jan Kara <jack@suse.cz> - 2017-04-03 18:10 +0200
Re: [PATCH 1/5] locking: Introduce range reader/writer lock Davidlohr Bueso <dave@stgolabs.net> - 2017-04-04 17:40 +0200
csiph-web