RFC locking: qspinlock
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest7 patches 18 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | qspinlock: Introducing a 4-byte queue spinlock implementationinclude/ include/ kernel/ +3 more | +377 | 1 reply | |
| 2/7 | qspinlock, x86: Enable x86 to use queue spinlockarch/ arch/ arch/ +1 more | +39 | 0 replies | |
| 3/7 | qspinlock: Add pending bitinclude/ kernel/ | +87 | 0 replies | |
| 4/7 | x86: Add atomic_test_and_set_bit()arch/ | +13 | 0 replies | |
| 5/7 | qspinlock: Optimize the pending caseinclude/ kernel/ | +36 | 0 replies | |
| 6/7 | qspinlock: Optimize xchg_tailkernel/ | +65 | 0 replies | |
| 7/7 | qspinlock: Optimize for smaller NR_CPUSinclude/ kernel/ | +98 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC][PATCH 0/7] locking: qspinlock
Hi Waiman,
I promised you this series a number of days ago; sorry for the delay I've been somewhat unwell :/
That said, these few patches start with a (hopefully) simple and correct form of the queue spinlock, and then gradually build upon it, explaining each optimization as we go.
Having these optimizations as separate patches helps twofold; firstly it makes one aware of which exact optimizations were done, and secondly it allows one to proove or disprove any one step; seeing how they should be mostly identity transforms.
The resulting code is near to what you posted I think; however it has one atomic op less in the pending wait-acquire case for NR_CPUS != huge. It also doesn't do lock stealing; its still perfectly fair afaict.
Have I missed any tricks from your code?
The patches apply to tip/master + lkml.kernel.org/r/[email protected]
I've yet to look at the paravirt stuff.