Skip to content

spinlock: queued read-write locks

David Vrabel xen-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 4 repliesIn review
  2. v24 patches 1 replySuperseded
  3. v14 patches 9 repliesSuperseded

Changes in v3 from the cover letter

- Fix CONFIG_XSM build.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2spinlock: move rwlock API and per-cpu rwlocks into their own filesxen/arch/x86/mm/mem_sharing.c xen/common/Makefile xen/common/rwlock.c +7 more+203 -1881 reply
2/2spinlock: fair read-write locksxen/common/rwlock.c xen/common/spinlock.c xen/include/xen/rwlock.h +1 more+284 -2363 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchJan Beulich
1/2
2/2A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCHv3 0/2] spinlock: queued read-write locks

This series replaces the current read-write lock implementation with the queued read-write locks from Linux. These are fair; under contention both readers and writers will be queued and obtain the lock in FIFO order (due to the fairness of the internal ticket lock).

The implementation is all in C and thus architecture independent.

Compared to the Linux implementation some of the memory barrier primitives were changed. The ARM maintainers may want to give this area a careful review.

Changes in v3:

- Fix CONFIG_XSM build.

Significant changes in v2:

- atomic_cmpxchg() is now arch-dependent as arm/arm64 already provided their own.
- Moved rwlocks into their own file.
- Removed the special casing of in_irq() in the slow read path.

David