qemu-e2k/hw/9pfs
Christian Schoenebeck 0c4356ba7d 9pfs: T_readdir latency optimization
Make top half really top half and bottom half really bottom half:

Each T_readdir request handling is hopping between threads (main
I/O thread and background I/O driver threads) several times for
every individual directory entry, which sums up to huge latencies
for handling just a single T_readdir request.

Instead of doing that, collect now all required directory entries
(including all potentially required stat buffers for each entry) in
one rush on a background I/O thread from fs driver by calling the
previously added function v9fs_co_readdir_many() instead of
v9fs_co_readdir(), then assemble the entire resulting network
response message for the readdir request on main I/O thread. The
fs driver is still aborting the directory entry retrieval loop
(on the background I/O thread inside of v9fs_co_readdir_many())
as soon as it would exceed the client's requested maximum R_readdir
response size. So this will not introduce a performance penalty on
another end.

Also: No longer seek initial directory position in v9fs_readdir(),
as this is now handled (more consistently) by
v9fs_co_readdir_many() instead.

Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Message-Id: <c7c3d1cf4e86611538cef44897842819d9359d7a.1596012787.git.qemu_oss@crudebyte.com>
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
2020-08-12 09:17:32 +02:00
..
9p-local.c virtio-9p: Use ERRP_GUARD() 2020-07-10 15:18:09 +02:00
9p-local.h 9pfs: local: open/opendir: don't follow symlinks 2017-02-28 11:21:15 +01:00
9p-posix-acl.c 9pfs: local: lremovexattr: don't follow symlinks 2017-02-28 11:21:15 +01:00
9p-proxy.c 9p/proxy: Fix export_flags 2020-03-10 16:12:49 +01:00
9p-proxy.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
9p-synth.c hw/9pfs/9p-synth: added directory for readdir test 2020-02-08 09:29:04 +01:00
9p-synth.h hw/9pfs/9p-synth: added directory for readdir test 2020-02-08 09:29:04 +01:00
9p-util.c 9p: Move a couple xattr functions to 9p-util 2018-06-07 12:17:22 +02:00
9p-util.h 9pfs: local: ignore O_NOATIME if we don't have permissions 2020-05-14 08:06:43 +02:00
9p-xattr-user.c 9pfs: local: lremovexattr: don't follow symlinks 2017-02-28 11:21:15 +01:00
9p-xattr.c 9p: Move a couple xattr functions to 9p-util 2018-06-07 12:17:22 +02:00
9p-xattr.h 9pfs: fix XattrOperations typedef 2018-01-08 11:18:22 +01:00
9p.c 9pfs: T_readdir latency optimization 2020-08-12 09:17:32 +02:00
9p.h 9pfs: add new function v9fs_co_readdir_many() 2020-08-12 09:17:32 +02:00
Kconfig 9p: simplify source file selection 2019-08-20 17:26:19 +02:00
Makefile.objs 9pfs: remove unnecessary conditionals 2019-03-07 21:45:53 +01:00
codir.c 9pfs: add new function v9fs_co_readdir_many() 2020-08-12 09:17:32 +02:00
cofile.c Include qemu/main-loop.h less 2019-08-16 13:31:52 +02:00
cofs.c Include qemu/main-loop.h less 2019-08-16 13:31:52 +02:00
coth.c Include qemu/main-loop.h less 2019-08-16 13:31:52 +02:00
coth.h 9pfs: add new function v9fs_co_readdir_many() 2020-08-12 09:17:32 +02:00
coxattr.c Include qemu/main-loop.h less 2019-08-16 13:31:52 +02:00
trace-events 9p: unsigned type for type, version, path 2019-10-10 11:36:04 +02:00
virtio-9p-device.c Revert "9p: init_in_iov_from_pdu can truncate the size" 2020-05-25 11:45:38 +02:00
virtio-9p.h 9pfs: introduce transport specific callbacks 2017-01-03 17:28:44 +01:00
xen-9p-backend.c xen/9pfs: increase max ring order to 9 2020-05-25 11:45:40 +02:00
xen-9pfs.h xen: Import other xen/io/*.h 2019-06-24 10:42:30 +01:00