Repository navigation
Commit 7b67c06
committed
fusedev: take uring payload buffers from kernel buffer pools
On Linux 7.3 and later, UringFuseServing gives each kernel queue a pool
of UringConfig::bufs_per_queue buffers before any entry registers. The
kernel lends a buffer to an entry while it serves a request with a
payload or a reply body, and reports where the buffer starts. Pooled
entries keep only their header and scratch area. Kernels that don't
offer pools at INIT keep a buffer per entry, as does bufs_per_queue = 0.
It defaults to 4, the default number of entries, and counts as at most
entries_per_queue.
A request without a payload and without out arguments gets no buffer,
and its offset of 0 looks like the first buffer. The opcode table now
records which requests have out arguments, and the others get an empty
reply body, so they can't write into another entry's buffer.
The benchmark daemon takes --uring-bufs N.
The benchmark daemon served a passthrough directory of 24 files of
256 MiB with --uring, 4 workers and 16 entries per queue, on a 24-CPU
machine with Linux 7.3-rc7. fio ran random 1 MiB and 4 KiB direct reads
with libaio at depth 16, one job pinned to each CPU, for 8 seconds,
through a fresh mount each run. The two settings alternated three times:
buffers per queue VmSize VmRSS 1 MiB reads 4 KiB reads
own per entry 1492 MiB 393 MiB 1518-1728 MiB/s 45.9-46.8k IOPS
4 431 MiB 106 MiB 1588-1709 MiB/s 44.5-45.7k IOPS
VmSize also counts each entry's request and reply scratch areas, which
are as large as its own payload buffer, so pooled entries save those
too.
Signed-off-by: Ilan Joselevich <personal@ilanjoselevich.com>1 parent 75205a5 commit 7b67c06
5 files changed
Lines changed: 543 additions & 136 deletions
File tree
- crates/fuse-backend-fusedev
- src
- docs
- tests/benchmark/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
0 commit comments