[Devel] [PATCH vz7 00/46] fuse: add multi-threading support

Maxim Patlasov mpatlasov at virtuozzo.com
Fri Mar 24 19:11:41 PDT 2017


The series add multi-threading support. This essentially means
more than one channel of communicatuion between kernel and
userspace (represented by "struct fuse_device") per single mount.

Thus, userspace can spawn several threads (or processes) each of
them handling its own channel of communication (cloned file
descriptor in terms of userspace fuse).

The implementation consits of two parts. The first part is backport
of 40+ patches from mainline. The result is finer-grained locking
where each fuse_device posesses independent "processing" and "io"
queues.

The second part (last two patches) implements AK's idea: we need
separate input queues to preserve cpu affinity (letting userspace
to ACK read request on the same cpu where the request was originated)
and to avoid thundering herd porblem (waking up only those userspace
processes who registred themselves on given input queue).

https://jira.sw.ru/browse/PSBM-60210

---

Maxim Patlasov (46):
      fuse: initialize fc->release before calling it
      fuse: fix background request if not connected
      fuse: reset waiting
      fuse: account as waiting before queuing for background
      fuse: check conn_error earlier
      fuse: fold fuse_request_send_nowait() into single caller
      fuse: add memory barrier to INIT
      fuse: call fuse_abort_conn() in dev release
      fuse: simplify request abort
      fuse: req use bitops
      fuse: use per req lock for lock/unlock_request()
      fuse: fold helpers into abort
      fuse: rework abort
      fuse: simplify unique ctr
      fuse: don't hold lock over request_wait_answer()
      fuse: simplify req states
      fuse: req state use flags
      fuse: separate out input queue
      fuse: flush requests on umount
      fuse: duplicate ->connected in iqueue
      fuse: abort: group iqueue accesses
      fuse: dev read: split list_move
      fuse: iqueue locking
      fuse: allow interrupt queuing without fc->lock
      fuse: no fc->lock for iqueue parts
      fuse: simplify request_wait()
      fuse: use list_for_each_entry() for list traversing
      fuse: separate out processing queue
      fuse: duplicate ->connected in pqueue
      fuse: move list_del_init() from request_end() into callers
      fuse: cleanup fuse_dev_do_read()
      fuse: abort: group pqueue accesses
      fuse: pqueue locking
      fuse: add req flag for private list
      fuse: request_end(): do once
      fuse: cleanup request_end()
      fuse: no fc->lock in request_end()
      fuse: no fc->lock for pqueue parts
      fuse: abort: no fc->lock needed for request ending
      fuse: device fd clone
      fuse: introduce per-instance fuse_dev structure
      fuse: separate pqueue for clones
      fuse: clear FR_PENDING flag when moving requests out of pending queue
      fuse: fix use after free issue in fuse_dev_do_read()
      fuse: separate iqueue for clones
      fuse: ioctl() to bind fuse device to input queue


 Documentation/ioctl/ioctl-number.txt |    1 
 fs/fuse/control.c                    |   51 +-
 fs/fuse/cuse.c                       |   23 +
 fs/fuse/dev.c                        |  922 ++++++++++++++++++----------------
 fs/fuse/file.c                       |   31 +
 fs/fuse/fuse_i.h                     |  187 ++++---
 fs/fuse/inode.c                      |  143 ++++-
 include/uapi/linux/fuse.h            |    4 
 8 files changed, 795 insertions(+), 567 deletions(-)

--
Signature


More information about the Devel mailing list