On Tue, Mar 25, 2025 at 05:06:53PM +0100, Hanna Czenczek wrote: > Make fuse_process_request() a coroutine_fn (fuse_co_process_request()) > and have read_from_fuse_fd() launch it inside of a newly created > coroutine instead of running it synchronously. This way, we can process > requests in parallel. > > These are the benchmark results, compared to (a) the original results > with libfuse, and (b) the results after switching away from libfuse > (i.e. before this patch): > > file: (vs. libfuse / vs. no libfuse) > read: > seq aio: 120.6k ±1.1k (+ 53 % / + 58 %) > rand aio: 113.3k ±5.9k (+188 % / +325 %) > seq sync: 52.4k ±0.4k (+ 61 % / + 10 %) > rand sync: 10.4k ±0.4k (+ 6 % / + 3 %) > write: > seq aio: 79.8k ±0.8k (+ 29 % / + 37 %) > rand aio: 79.0k ±0.6k (+ 29 % / + 36 %) > seq sync: 41.5k ±0.3k (+ 49 % / + 15 %) > rand sync: 41.4k ±0.2k (+ 50 % / + 15 %) > null: > read: > seq aio: 266.1k ±1.5k (+ 24 % / - 1 %) > rand aio: 264.1k ±2.5k (+ 24 % / ± 0 %) > seq sync: 135.6k ±3.2k (+ 50 % / + 1 %) > rand sync: 134.7k ±3.0k (+ 50 % / + 2 %) > write: > seq aio: 281.0k ±1.8k (+ 38 % / + 2 %) > rand aio: 288.1k ±6.1k (+ 43 % / + 6 %) > seq sync: 142.2k ±3.1k (+ 65 % / + 9 %) > rand sync: 141.1k ±2.9k (+ 66 % / + 11 %) > > So for non-AIO cases (and the null driver, which does not yield), there > is little change; but for file AIO, results greatly improve, resolving > the performance issue we saw before (when switching away from libfuse). > > Signed-off-by: Hanna Czenczek <hre...@redhat.com> > --- > block/export/fuse.c | 209 ++++++++++++++++++++++++++------------------ > 1 file changed, 126 insertions(+), 83 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
signature.asc
Description: PGP signature