]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcachefs: fast_list
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 28 Sep 2024 20:22:38 +0000 (16:22 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 22 May 2025 00:14:29 +0000 (20:14 -0400)
commitd49bafdc5d1659171d988888ebfc773629f8ca97
treef9f40329493d5ca6c290ac6eca91a54b85eee8db
parent989b4c375a330c8f0cd18aa891c67ac56bec2984
bcachefs: fast_list

A fast "list" data structure, which is actually a radix tree, with an
IDA for slot allocation and a percpu buffer on top of that.

Items cannot be added or moved to the head or tail, only added at some
(arbitrary) position and removed. The advantage is that adding, removing
and iteration is generally lockless, only hitting the lock in ida when
the percpu buffer is full or empty.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/Makefile
fs/bcachefs/fast_list.c [new file with mode: 0644]
fs/bcachefs/fast_list.h [new file with mode: 0644]