From nobody Sun Nov 16 05:37:13 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=crudebyte.com ARC-Seal: i=1; a=rsa-sha256; t=1599147155; cv=none; d=zohomail.com; s=zohoarc; b=aZuN5tZiN786HKqA+4oS88e416885PUoGYGpyGVDgRtS7yOUke4rZ+dYZZ9Zn9DKCxecBtQovoAS3PTgtDKlNImdh1vNg6AqN7S9DkrtUV+Kt+UNVZzxcV87FZv2bXzgdvIOFUz6xagwUaoOx6ztd4SyExy5j2dY7nzKFGIVQp4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599147155; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=wz18YHl+V8t7V7RQfz0zNrUfrvwXmGoli925uhjHY50=; b=dj5bZiRM/r2rEhp+9DXuuiNiEA1SFIxZArweft+xMrNRdafOPANpPuomzGuoGDEb2Hy6WwTf5hL4cLpD7YAk+sJhBmRb5RCofNbqXo2J/+lyq0eGRGEUnn1QwJZqYgUTYkqvj+PdImTwA8A4K7lKAlQNRwD7F0H73VX9Mm9HY2c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1599147155924797.8269716411033; Thu, 3 Sep 2020 08:32:35 -0700 (PDT) Received: from localhost ([::1]:49130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDrE3-0007d4-43 for importer@patchew.org; Thu, 03 Sep 2020 11:32:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52024) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDrB6-0004XI-Ey for qemu-devel@nongnu.org; Thu, 03 Sep 2020 11:29:33 -0400 Received: from lizzy.crudebyte.com ([91.194.90.13]:56575) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDrB3-0000YA-8K for qemu-devel@nongnu.org; Thu, 03 Sep 2020 11:29:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crudebyte.com; s=lizzy; h=Cc:To:Subject:Date:From:References:In-Reply-To: Message-Id:Content-Type:Content-Transfer-Encoding:MIME-Version:Content-ID: Content-Description; bh=wz18YHl+V8t7V7RQfz0zNrUfrvwXmGoli925uhjHY50=; b=csU80 tHK4KnU58TMxcJBs0lZqYCCCj3a27nQ0V7Rex7a17VUtFVP8n7sxl8wRDD9kJV/nA3yDftknWEBpJ cG6lnDzVNC86T4tgwzn0HuO2d8o1ack84lknGcaBULvz/VseC5vXmoE0L6+gOlhPIyC89RHsfB4Ot E/m0ou0LTZsiEUIlfFtkYjmz3pIpAXfYc0KySUwfFa8A2zm1msvzvm2MdPIve1aF9hxUOdoBYvCPB RUDUI4U+XVCH0O169fs/TJp3pDxI59xbdVsgT/3A8JOmL7w2HMfwIDmt7aE+n3ddFOzZ/gkxqq5bJ 2gI1zEeTdHjdoyh52J4jUwOzbZRdw==; Message-Id: In-Reply-To: References: From: Christian Schoenebeck Date: Thu, 3 Sep 2020 16:20:21 +0200 Subject: [PATCH v2 1/1] 9pfs: log warning if msize <= 8192 To: qemu-devel@nongnu.org Cc: Greg Kurz Cc: berrange@redhat.com Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=91.194.90.13; envelope-from=e6fc84845c95816ad5baecb0abd6bfefdcf7ec9f@lizzy.crudebyte.com; helo=lizzy.crudebyte.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/03 10:59:11 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @crudebyte.com) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" It is essential to choose a reasonable high value for 'msize' to avoid severely degraded file I/O performance. This parameter can only 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', which results in very poor file I/O performance. 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 (with a QEMU wiki link explaining this issue in detail) on host side in that case to make it more clear. Currently a client cannot automatically pick a reasonable value for 'msize', because a good value for 'msize' depends on the file I/O potential of the underlying storage on host side, i.e. a feature invisible to the client, and even then a user would still need to trade off between performance profit and additional RAM costs, i.e. with growing 'msize' (RAM occupation), performance still increases, but performance delta will shrink continuously. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz --- hw/9pfs/9p.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 7bb994bbf2..99b6f24fd6 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -1353,6 +1353,15 @@ static void coroutine_fn v9fs_version(void *opaque) goto out; } =20 + /* 8192 is the default msize of Linux clients */ + if (s->msize <=3D 8192) { + warn_report_once( + "9p: degraded performance: a reasonable high msize should be " + "chosen on client/guest side (chosen msize is <=3D 8192). See " + "https://wiki.qemu.org/Documentation/9psetup#msize for details= ." + ); + } + marshal: err =3D pdu_marshal(pdu, offset, "ds", s->msize, &version); if (err < 0) { --=20 2.20.1