All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/24] export/fuse: Use coroutines and multi-threading
@ 2026-02-18 13:26 Hanna Czenczek
  2026-02-18 13:26 ` [PATCH v4 01/24] fuse: Copy write buffer content before polling Hanna Czenczek
                   ` (24 more replies)
  0 siblings, 25 replies; 29+ messages in thread
From: Hanna Czenczek @ 2026-02-18 13:26 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Hanna Czenczek, Kevin Wolf, Brian Song

Hi,

This series:
- Fixes some bugs/minor inconveniences,
- Removes libfuse from the request processing path,
- Make the FUSE export use coroutines for request handling,

More detail on the v1 cover letter:
https://lists.nongnu.org/archive/html/qemu-block/2025-03/msg00359.html

v2 cover letter:
https://lists.nongnu.org/archive/html/qemu-block/2025-06/msg00040.html

v3 cover letter:
https://lists.nongnu.org/archive/html/qemu-block/2025-07/msg00005.html


I noticed some performance differences vs. my previous benchmarks;
notably, performance didn’t improve with the introduction of coroutines
much (except for random read performance).  However, when I run the same
benchmarks on the old branch again, I see no performance improvement
either.  Something about my host system must have changed.


Changes from v3:
- Patch 1: Use QEMU_AUTO_VFREE
- Patch 6: Added (fix for pre-existing bug)
- Patch 11: Make flag atomic, better this way for multithreading later
- Patch 12: Rename not only in fuse_write(), but fuse_read() as well
- Patch 13: Added (don’t truncate if we don’t want to test that)
- Patch 14: Added (fix for pre-existing bugs)
- Patch 16: Rewrote core parts:
  - Remove the macros to handle different FUSE requests in the same
    buffer, instead use unions
  - Restructure how we read data from FUSE:
    No longer one request_buf per queue, but instead a non-WRITE buffer
    on the stack, and a WRITE data buffer on the heap. We pass this via
    readv(), but it means that for non-WRITE requests, data that we want
    on the stack may spill into the heap buffer, so we need to copy it
    back. We cache the data buffer between non-WRITE requests so we at
    least don’t have to reallocate it all the time.
  - Actually take care of older FUSE versions down to 7.9 (2007)
  - Handle some more requests that should be handled: STATFS, DESTROY,
    FORGET, BATCH_FORGET
  - Don’t handle short writes on /dev/fuse
  - Move initializing fuse_out_header into the callers of
    fuse_write_response() and fuse_write_buf_response()
- Patch 18: Rebase conflicts because of patch 16, and removed the unused
  FuseRequestCoParam
- Patch 19: Adhere to QAPI max line length
- Patch 21: Added, not sure if absolutely necessary, but won’t hurt
  either
- Patch 22: Rebase conflicts because of patch 16


git-backport-diff from v3:

Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/24:[0009] [FC] 'fuse: Copy write buffer content before polling'
002/24:[----] [--] 'fuse: Ensure init clean-up even with error_fatal'
003/24:[----] [--] 'fuse: Remove superfluous empty line'
004/24:[----] [--] 'fuse: Explicitly set inode ID to 1'
005/24:[----] [--] 'fuse: Change setup_... to mount_fuse_export()'
006/24:[down] 'fuse: Destroy session on mount_fuse_export() fail'
007/24:[----] [--] 'fuse: Fix mount options'
008/24:[----] [--] 'fuse: Set direct_io and parallel_direct_writes'
009/24:[----] [--] 'fuse: Introduce fuse_{at,de}tach_handlers()'
010/24:[----] [--] 'fuse: Introduce fuse_{inc,dec}_in_flight()'
011/24:[0008] [FC] 'fuse: Add halted flag'
012/24:[0012] [FC] 'fuse: fuse_{read,write}: Rename length to blk_len'
013/24:[down] 'iotests/308: Use conv=notrunc to test growability'
014/24:[down] 'fuse: Explicitly handle non-grow post-EOF accesses'
015/24:[----] [--] 'block: Move qemu_fcntl_addfl() into osdep.c'
016/24:[0718] [FC] 'fuse: Manually process requests (without libfuse)'
017/24:[----] [-C] 'fuse: Reduce max read size'
018/24:[0102] [FC] 'fuse: Process requests in coroutines'
019/24:[0018] [FC] 'block/export: Add multi-threading interface'
020/24:[----] [--] 'iotests/307: Test multi-thread export interface'
021/24:[down] 'fuse: Make shared export state atomic'
022/24:[0084] [FC] 'fuse: Implement multi-threading'
023/24:[----] [--] 'qapi/block-export: Document FUSE's multi-threading'
024/24:[----] [--] 'iotests/308: Add multi-threading sanity test'


Hanna Czenczek (24):
  fuse: Copy write buffer content before polling
  fuse: Ensure init clean-up even with error_fatal
  fuse: Remove superfluous empty line
  fuse: Explicitly set inode ID to 1
  fuse: Change setup_... to mount_fuse_export()
  fuse: Destroy session on mount_fuse_export() fail
  fuse: Fix mount options
  fuse: Set direct_io and parallel_direct_writes
  fuse: Introduce fuse_{at,de}tach_handlers()
  fuse: Introduce fuse_{inc,dec}_in_flight()
  fuse: Add halted flag
  fuse: fuse_{read,write}: Rename length to blk_len
  iotests/308: Use conv=notrunc to test growability
  fuse: Explicitly handle non-grow post-EOF accesses
  block: Move qemu_fcntl_addfl() into osdep.c
  fuse: Manually process requests (without libfuse)
  fuse: Reduce max read size
  fuse: Process requests in coroutines
  block/export: Add multi-threading interface
  iotests/307: Test multi-thread export interface
  fuse: Make shared export state atomic
  fuse: Implement multi-threading
  qapi/block-export: Document FUSE's multi-threading
  iotests/308: Add multi-threading sanity test

 qapi/block-export.json               |   41 +-
 include/block/export.h               |   12 +-
 include/qemu/osdep.h                 |    1 +
 block/export/export.c                |   48 +-
 block/export/fuse.c                  | 1278 ++++++++++++++++++++------
 block/export/vduse-blk.c             |    7 +
 block/export/vhost-user-blk-server.c |    8 +
 block/file-posix.c                   |   17 +-
 nbd/server.c                         |    6 +
 util/osdep.c                         |   18 +
 tests/qemu-iotests/307               |   47 +
 tests/qemu-iotests/307.out           |   18 +
 tests/qemu-iotests/308               |   95 +-
 tests/qemu-iotests/308.out           |   71 +-
 14 files changed, 1358 insertions(+), 309 deletions(-)

-- 
2.53.0



^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2026-03-05 17:57 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-18 13:26 [PATCH v4 00/24] export/fuse: Use coroutines and multi-threading Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 01/24] fuse: Copy write buffer content before polling Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 02/24] fuse: Ensure init clean-up even with error_fatal Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 03/24] fuse: Remove superfluous empty line Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 04/24] fuse: Explicitly set inode ID to 1 Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 05/24] fuse: Change setup_... to mount_fuse_export() Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 06/24] fuse: Destroy session on mount_fuse_export() fail Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 07/24] fuse: Fix mount options Hanna Czenczek
2026-03-05 17:56   ` Kevin Wolf
2026-02-18 13:26 ` [PATCH v4 08/24] fuse: Set direct_io and parallel_direct_writes Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 09/24] fuse: Introduce fuse_{at,de}tach_handlers() Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 10/24] fuse: Introduce fuse_{inc,dec}_in_flight() Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 11/24] fuse: Add halted flag Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 12/24] fuse: fuse_{read,write}: Rename length to blk_len Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 13/24] iotests/308: Use conv=notrunc to test growability Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 14/24] fuse: Explicitly handle non-grow post-EOF accesses Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 15/24] block: Move qemu_fcntl_addfl() into osdep.c Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 16/24] fuse: Manually process requests (without libfuse) Hanna Czenczek
2026-02-26 19:26   ` Kevin Wolf
2026-02-26 19:29   ` Kevin Wolf
2026-02-18 13:26 ` [PATCH v4 17/24] fuse: Reduce max read size Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 18/24] fuse: Process requests in coroutines Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 19/24] block/export: Add multi-threading interface Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 20/24] iotests/307: Test multi-thread export interface Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 21/24] fuse: Make shared export state atomic Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 22/24] fuse: Implement multi-threading Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 23/24] qapi/block-export: Document FUSE's multi-threading Hanna Czenczek
2026-02-18 13:26 ` [PATCH v4 24/24] iotests/308: Add multi-threading sanity test Hanna Czenczek
2026-02-26 19:54 ` [PATCH v4 00/24] export/fuse: Use coroutines and multi-threading Kevin Wolf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.