Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1543850
| From | Darren Hart <dvhart@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH -v4 00/10] FUTEX_UNLOCK_PI wobbles |
| Date | 2016-12-17 00:40 +0100 |
| Message-ID | <sPagx-1J3-5@gated-at.bofh.it> (permalink) |
| References | <sNRfX-7LI-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Dec 13, 2016 at 09:36:38AM +0100, Peter Zijlstra wrote: > > Hi all, > > This is (I think) the 4th attempt at fixing this tiny pesky issue with > FUTEX_UNLOCK_PI, where we would really like to drop (and unboost) the rt_mutex > without holding hb->lock. > > While going through the requeue PI code and thinking about how all that worked > I realized we can avoid the entire problem I've been trying to solve. That is, > the 'problem' is that futex state and rt_mutex state can end up disagreeing on > who is waiting for the lock and we muddle around that with intricate state. > > This series, well patch 8, avoids the entire problem by making sure this > inconsistent state does not occur. Which then simplifies everything -- assuming > I got it right of course :-) > > The basic idea is to, like requeue PI, break the rt_mutex_lock() function into > pieces, such that we can enqueue the waiter while holding hb->lock, wait for > acquisition without hb->lock and can remove the waiter, on failure, while > holding hb->lock again. Oh boy, this is going to take some brain space/time. I'll comment as I work through them and ask questions - to keep the dialog going. > > That way, when we drop hb->lock to wait, futex and rt_mutex wait state is > consistent. > > > In any case, it passes our inadequate testing. It passed my CI tools/testing/selftests/futex/functional/run.sh. Did you also happen to run a fuzz tester? -- Darren Hart Intel Open Source Technology Center
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH -v4 00/10] FUTEX_UNLOCK_PI wobbles Peter Zijlstra <peterz@infradead.org> - 2016-12-13 10:10 +0100
[PATCH -v4 08/10] futex: Rework futex_lock_pi() vs rt_mutex_timed_futex_lock() Peter Zijlstra <peterz@infradead.org> - 2016-12-13 10:10 +0100
[PATCH -v4 06/10] futex,rt_mutex: Provide futex specific rt_mutex API Peter Zijlstra <peterz@infradead.org> - 2016-12-13 10:10 +0100
[PATCH -v4 03/10] futex: Cleanup variable names for futex_top_waiter() Peter Zijlstra <peterz@infradead.org> - 2016-12-13 10:10 +0100
Re: [PATCH -v4 03/10] futex: Cleanup variable names for futex_top_waiter() Darren Hart <dvhart@infradead.org> - 2016-12-17 01:20 +0100
Re: [PATCH -v4 00/10] FUTEX_UNLOCK_PI wobbles Peter Zijlstra <peterz@infradead.org> - 2016-12-13 17:10 +0100
Re: [PATCH -v4 00/10] FUTEX_UNLOCK_PI wobbles Darren Hart <dvhart@infradead.org> - 2016-12-17 00:40 +0100
Re: [PATCH -v4 00/10] FUTEX_UNLOCK_PI wobbles Peter Zijlstra <peterz@infradead.org> - 2016-12-17 15:00 +0100
Re: [PATCH -v4 00/10] FUTEX_UNLOCK_PI wobbles Darren Hart <dvhart@infradead.org> - 2016-12-18 23:40 +0100
csiph-web