[PATCH v2 0/2] 9pfs: v9fs_reclaim_fd() fixes

Christian Schoenebeck posted 2 patches 3 weeks, 3 days ago
hw/9pfs/9p.c | 39 ++++++++++++++++++++++++++++++---------
hw/9pfs/9p.h |  1 +
2 files changed, 31 insertions(+), 9 deletions(-)
[PATCH v2 0/2] 9pfs: v9fs_reclaim_fd() fixes
Posted by Christian Schoenebeck 3 weeks, 3 days ago
Three fixes for 9p server's v9fs_reclaim_fd() function:

* Patch 1 fixes a concurrency issue.

* Patch 2 fixes a file descriptor leak and optimizes overall latency. On a test
  machine with ~800,000 FIDs, this reduced execution duration of
  v9fs_reclaim_fd() from 30ms to 1ms.

V2:
  - Patch 2: Decrement global variable total_open_fd on main thread, not
    on fs driver background thread.
  - Patch 2: Update commit log about file descriptor leak being fixed.

Christian Schoenebeck (2):
  9pfs: fix concurrent v9fs_reclaim_fd() calls
  9pfs: fix FD leak and reduce latency of v9fs_reclaim_fd()

 hw/9pfs/9p.c | 39 ++++++++++++++++++++++++++++++---------
 hw/9pfs/9p.h |  1 +
 2 files changed, 31 insertions(+), 9 deletions(-)

-- 
2.39.5
Re: [PATCH v2 0/2] 9pfs: v9fs_reclaim_fd() fixes
Posted by Christian Schoenebeck 1 week, 6 days ago
On Friday, March 7, 2025 10:24:12 AM CET Christian Schoenebeck wrote:
> Three fixes for 9p server's v9fs_reclaim_fd() function:
> 
> * Patch 1 fixes a concurrency issue.
> 
> * Patch 2 fixes a file descriptor leak and optimizes overall latency. On a test
>   machine with ~800,000 FIDs, this reduced execution duration of
>   v9fs_reclaim_fd() from 30ms to 1ms.
> 
> V2:
>   - Patch 2: Decrement global variable total_open_fd on main thread, not
>     on fs driver background thread.
>   - Patch 2: Update commit log about file descriptor leak being fixed.
> 
> Christian Schoenebeck (2):
>   9pfs: fix concurrent v9fs_reclaim_fd() calls
>   9pfs: fix FD leak and reduce latency of v9fs_reclaim_fd()
> 
>  hw/9pfs/9p.c | 39 ++++++++++++++++++++++++++++++---------
>  hw/9pfs/9p.h |  1 +
>  2 files changed, 31 insertions(+), 9 deletions(-)
> 
> 

Queued on 9p.next:
https://github.com/cschoenebeck/qemu/commits/9p.next

Thanks!

/Christian