#piece #io-uring #fluke #count #big #buffer #buffet

nightly fluke-buffet

Buffer management for the fluke crate

1 unstable release

0.1.0 Oct 3, 2023

#34 in #big

Download history 2/week @ 2024-02-14 12/week @ 2024-02-21 6/week @ 2024-02-28 11/week @ 2024-03-06 11/week @ 2024-03-13 3/week @ 2024-03-20 36/week @ 2024-03-27 25/week @ 2024-04-03

64 downloads per month
Used in fluke

MIT/Apache

97KB
2.5K SLoC

fluke-buffet

This crate is mostly a terrible idea, but it's doing buffer management for fluke.

It's designed to memmap a big chunk of memory and then, well, hand out reference-counted (non-thread-safe) pieces of it. It was faster than stack allocation in some benchmark I did a while ago.

Also, it's compatible with io_uring in that you can give ownership of one of the pieces to a read/write operation and nobody else is able to use it until that operation is done, which is really neat.

There's a bunch of splitting operations that try to maintain reference count and the general "one mutable reference XOR multiple read-only references" vibe of the whole endeavor.

I'm not honestly convinced buffet is the optimal way to go about this, but it works for now, it's io_uring and fallback-codepath friendly... ah well.

Dependencies

~4–16MB
~158K SLoC