RFC futex: Allow lockless empty check of hashbucket plist in futex_wake()
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest5 patches 25 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | futex: Misc cleanupskernel/ | +12 | 0 replies | |
| 2/5 | futex: Document ordering guaranteeskernel/ | +57 | 0 replies | |
| 3/5 | futex: Split out unlock from queue_me()kernel/ | +16 | 0 replies | |
| 4/5 | futex: Enqueue waiter before user space checkkernel/ | +49 | 1 reply | |
| 5/5 | futex: Allow lockless empty check of hash bucket plistkernel/ | +91 | 0 replies |
Reviews trailers per patch
1 of 5 patches has a Reviewed-by or Acked-by.
| Patch | Darren Hart |
|---|---|
| 1/5 | |
| 2/5 | |
| 3/5 | |
| 4/5 | R-b |
| 5/5 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC patch 0/5] futex: Allow lockless empty check of hashbucket plist in futex_wake()
The patch set from Davidlohr [1] tried to attempt the same via an atomic counter of waiters in a hash bucket. The atomic counter access provided enough serialization for x86 so that a failure is not observable in testing, but does not provide any guarantees.
The same can be achieved with a smp_mb() pair including proper guarantees for all architectures.
The following series provides an incremental approach to this and adds documentation of the ordering guarantees of futexes.
Note, this is RFC and needs a lot of review, testing and proper performance numbers for the following scenarios:
1) Test case where a single waiter is about to queue itself, i.e. the test case Davidlohr used to gather his numbers.
2) Test case where the hash bucket is always not empty. This allows us to determine the smp_mb() overhead for cases which are not optimized by the singler waiter per bucket.
These tests need to be done on x86 AND on other architectures where the smp_mb() might be more expensive than on x86.
Thanks,
tglx