qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] 9pfs: log warning if msize <= 8192


From: Christian Schoenebeck
Subject: [PATCH] 9pfs: log warning if msize <= 8192
Date: Wed, 2 Sep 2020 13:22:49 +0200

It is essential to choose a reasonable high value for 'msize' to avoid
severe degraded file I/O performance. This parameter has to be chosen
on client/guest side, and a Linux client defaults to an 'msize' of only
8192 if the user did not explicitly specify a value for 'msize'.

Unfortunately many users are not aware that they should specify an
appropriate value for 'msize' to avoid severe performance issues, so
log a performance warning on host side in that case to make it more
clear.

Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
---
 hw/9pfs/9p.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 7bb994bbf2..33e948d636 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -1353,6 +1353,14 @@ static void coroutine_fn v9fs_version(void *opaque)
         goto out;
     }
 
+    /* 8192 is the default msize of Linux clients */
+    if (s->msize <= 8192) {
+        warn_report_once(
+            "9p: degraded performance: a reasonable high msize should be "
+            "chosen on client/guest side (chosen msize is <= 8192)."
+        );
+    }
+
 marshal:
     err = pdu_marshal(pdu, offset, "ds", s->msize, &version);
     if (err < 0) {
-- 
2.20.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]