Skip to content

RFC Lock-less list

Huang Ying lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 8 repliesIn review

v9 from the cover letter

- Split out lock-less allocator, will repost allocator with its user in another patchset.
- Use lock-less list in irq_work and replace net/rds/xlist.h

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Add Kconfig option ARCH_HAVE_NMI_SAFE_CMPXCHGarch/Kconfig arch/alpha/Kconfig arch/avr32/Kconfig +10 more+15 -02 replies
2/4lib, Add lock-less NULL terminated single listinclude/linux/llist.h lib/Kconfig lib/Makefile +1 more+223 -00 replies
3/4irq_work, Use llist in irq_workinclude/linux/irq_work.h init/Kconfig kernel/irq_work.c+46 -600 replies
4/4net, rds, Replace xlist in net/rds/xlist.h with llistnet/rds/Kconfig net/rds/ib_rdma.c net/rds/xlist.h+50 -1414 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchAndi KleenMike FrysingerPaul MundtHans-Christian EgtvedtBenjamin HerrenschmidtChris Metcalf
1/4A-b A-b A-b A-b A-b
2/4R-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.

Read the v1 thread

Cover letter [RFC -v9 0/4] Lock-less list

Add a lock-less NULL-terminated linked list implementation. And use that in irq_work and replace net/rds/xlist.h.

v9:

- Split out lock-less allocator, will repost allocator with its user in another patchset.
- Use lock-less list in irq_work and replace net/rds/xlist.h

v8:

- Rebased on mmotm 2010-12-02

v7:

- Revise ARCH_HAVE_NMI_SAFE_CMPXCHG definition for some architectures according to architecture maitainers' comments.
- Remove spin_trylock_irqsave based fallback for lockless memory allocator, because it does not work for !CONFIG_SMP and is not likely to be used.
- Make lockless memory allocator and list does not depend on ARCH_HAVE_NMI_SAFE_CMPXCHG. Instead, require the user to depend on it when needed. And BUG_ON(in_nmi()) is added in necessary place to prevent silent race.

v6:

- Revise ARCH_HAVE_NMI_SAFE_CMPXCHG definition for some architectures according to architecture maitainers' comments.

v5:

- Add ARCH_HAVE_NMI_SAFE_CMPXCHG
- Add spin_trylock_irqsave based fallback in lockless memory allocator if ARCH_HAVE_NMI_SAFE_CMPXCHG=n
- Make lockless list depends on ARCH_HAVE_NMI_SAFE_CMPXCHG

v4:

- Split from APEI patchset
- Update patch description and comments according to ML comments

v3:

- Rework lockless memory allocator and list according to ML comments

[RFC -v9 1/4] Add Kconfig option ARCH_HAVE_NMI_SAFE_CMPXCHG [RFC -v9 2/4] lib, Add lock-less NULL terminated single list [RFC -v9 3/4] irq_work, Use llist in irq_work
[RFC -v9 4/4] net, rds, Replace xlist in net/rds/xlist.h with llist