diff options
| author | Christian Schoenebeck <qemu_oss@crudebyte.com> | 2025-03-07 10:22:56 +0100 |
|---|---|---|
| committer | Christian Schoenebeck <qemu_oss@crudebyte.com> | 2025-05-05 11:28:28 +0200 |
| commit | 61da38db70affd925226ce1e8a61d761c20d045b (patch) | |
| tree | 1447c147d327735462719de8d7d40398e068d2ff /rust/qemu-api/src/prelude.rs | |
| parent | 5134cf9b5d3aee4475fe7e1c1c11b093731073cf (diff) | |
| download | focaccia-qemu-61da38db70affd925226ce1e8a61d761c20d045b.tar.gz focaccia-qemu-61da38db70affd925226ce1e8a61d761c20d045b.zip | |
9pfs: fix concurrent v9fs_reclaim_fd() calls
Even though this function is serialized to be always called from main
thread, v9fs_reclaim_fd() is dispatching the coroutine to a worker thread
in between via its v9fs_co_*() calls, hence leading to the situation where
v9fs_reclaim_fd() is effectively executed multiple times simultaniously,
which renders its LRU algorithm useless and causes high latency.
Fix this by adding a simple boolean variable to ensure this function is
only called once at a time. No synchronization needed for this boolean
variable as this function is only entered and returned on main thread.
Fixes: 7a46274529c ('hw/9pfs: Add file descriptor reclaim support')
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: <5c622067efd66dd4ee5eca740dcf263f41db20b2.1741339452.git.qemu_oss@crudebyte.com>
Diffstat (limited to 'rust/qemu-api/src/prelude.rs')
0 files changed, 0 insertions, 0 deletions