On 5/9/22 17:03, Linus Heckemann wrote:
The previous implementation would iterate over the fid table for
lookup operations, resulting in an operation with O(n) complexity on
the number of open files and poor cache locality -- for every open,
stat, read, write, etc operation.

This change uses a hashtable for this instead, significantly improving
the performance of the 9p filesystem. The runtime of NixOS's simple
installer test, which copies ~122k files totalling ~1.8GiB from 9p,
decreased by a factor of about 10.

Signed-off-by: Linus Heckemann <g...@sphalerite.org>
---
  hw/9pfs/9p.c | 130 +++++++++++++++++++++++++++------------------------
  hw/9pfs/9p.h |   2 +-
  2 files changed, 69 insertions(+), 63 deletions(-)

Watch out to iterate the version when respining patches:

"Send each new revision as a new top-level thread, rather than burying it in-reply-to an earlier revision, as many reviewers are not looking inside deep threads for new patches."
https://www.qemu.org/docs/master/devel/submitting-a-patch.html#when-resending-patches-add-a-version-tag
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>

Reply via email to