locking/osq_lock: Optimisations to osq_lock code
Status from this message: The following commit has been merged into the locking/core branch of tip:
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest9 patches 41 repliesApplied
- v35 patches 14 repliesSuperseded
Patches in v4 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | locking/osq_lock: Add some comments about how it workskernel/ | +24 | 1 reply | |
| 2/9 | locking/osq_lock: Save the cpu number for 'prev' not the node addresskernel/ | +14 | 5 replies | |
| 3/9 | locking/osq_lock: Set prev_cpu=0 instead of locked=1kernel/ | +28 | 17 replies | |
| 4/9 | locking/osq_lock: Delete 'fast path' code from osq_unlock()kernel/ | +73 | 2 replies | |
| 5/9 | locking/osq_lock: Avoid writing to node->next in the osq_lock() fast pathkernel/ | +5 | 0 replies | |
| 6/9 | locking/osq: Use cpu number for 'next' pointerkernel/ | +22 | 0 replies | |
| 7/9 | locking/osq: Use 'unsigned int' for next/prev/tailinclude/ kernel/ | +19 | 0 replies | |
| 8/9 | locking/osq: inline encode_cpu() and rename decode_cpu()kernel/ | +7 | 0 replies | |
| 9/9 | locking/osq_lock: Swap next<->prev and tail<->headinclude/ kernel/ | +86 | 0 replies |
Reviews trailers per patch
1 of 9 patches has a Reviewed-by or Acked-by.
| Patch | Waiman Long | Håkon Bugge |
|---|---|---|
| Series | T-b | |
| 1/9 | ||
| 2/9 | R-b | |
| 3/9 | ||
| 4/9 | ||
| 5/9 | ||
| 6/9 | ||
| 7/9 | ||
| 8/9 | ||
| 9/9 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 next 0/9] locking/osq_lock: Optimisations to osq_lock code
This is a continuation of some patches I wrote over two years ago. They go a lot further and reduce the per-cpu data to a structure that only contains two cpu numbers.
I've fixed some broken/missing memory barriers but left the initial xchg() when acquiring the lock as a full barrier, I think it could be relaxed.
Tested with a userspace harness that can conditionally sleep at various points.
David Laight (9):
locking/osq_lock: Add some comments about how it works locking/osq_lock: Save the cpu number for 'prev' not the node address locking/osq_lock: Set prev_cpu=0 instead of locked=1 locking/osq_lock: Delete 'fast path' code from osq_unlock() locking/osq_lock: Avoid writing to node->next in the osq_lock() fast
path
locking/osq: Use cpu number for 'next' pointer locking/osq: Use 'unsigned int' for next/prev/tail locking/osq: inline encode_cpu() and rename decode_cpu() locking/osq_lock: Swap next<->prev and tail<->head
include/linux/osq_lock.h | 10 +- kernel/locking/osq_lock.c | 286 ++++++++++++++++++++------------------ 2 files changed, 154 insertions(+), 142 deletions(-)
Signature · 1 line
2.39.5