From patchwork Sat Sep 4 15:07:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Schoenebeck X-Patchwork-Id: 12475805 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DATE_IN_PAST_03_06, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85041C433EF for ; Sat, 4 Sep 2021 18:30:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7340660F91 for ; Sat, 4 Sep 2021 18:30:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237392AbhIDSbn (ORCPT ); Sat, 4 Sep 2021 14:31:43 -0400 Received: from lizzy.crudebyte.com ([91.194.90.13]:53875 "EHLO lizzy.crudebyte.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234085AbhIDSbm (ORCPT ); Sat, 4 Sep 2021 14:31:42 -0400 X-Greylist: delayed 1838 seconds by postgrey-1.27 at vger.kernel.org; Sat, 04 Sep 2021 14:31:42 EDT 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=Tut7eTe5qe1gcpJfndZBSuyDAml0NcR3QWvzUhKfSJY=; b=oYHno iRcK+FKCG4rE4dKoOsvOtE16e06TIYCMX1cdpwU2WFr43Uym6XV0ppIsplej2Z8glajT79hBJ3Ujg TnIKexznxmAoi2a4UzTPyC1B3DB/6fxLefXyH3mcD9izODJeJAQE3p63zolbw//aflxsD2UAEns4F /GY3x7TsVJp1CwLKIZtTJ5QJfLJEff5hhB77DjML2jbl2NkyT8ZKlUpkU3Z84Xnd5+5XApgvwB1zJ FMg/OsVKjxnIkbxpEMgEph4g4Y2lKg2K/mFNxCB6URN4IqZXcSmsj5HQE/TxW3f1nVebF6+ERxoce G5+OCVjw4XtQ9d+tHZulD4BHwprGg==; Message-Id: <28bb651ae0349a7d57e8ddc92c1bd5e62924a912.1630770829.git.linux_oss@crudebyte.com> In-Reply-To: References: From: Christian Schoenebeck Date: Sat, 4 Sep 2021 17:07:12 +0200 Subject: [PATCH 1/2] net/9p: use macro to define default msize To: v9fs-developer@lists.sourceforge.net Cc: netdev@vger.kernel.org, Dominique Martinet , Eric Van Hensbergen , Latchesar Ionkov , Greg Kurz Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Use a macro to define the default value for the 'msize' option at one place instead of using two separate integer literals. Signed-off-by: Christian Schoenebeck --- net/9p/client.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/9p/client.c b/net/9p/client.c index b7b958f61faf..1cb255587fff 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -30,6 +30,8 @@ #define CREATE_TRACE_POINTS #include +#define DEFAULT_MSIZE 8192 + /* * Client Option Parsing (code inspired by NFS code) * - a little lazy - parse all client options @@ -65,7 +67,7 @@ EXPORT_SYMBOL(p9_is_proto_dotu); int p9_show_client_options(struct seq_file *m, struct p9_client *clnt) { - if (clnt->msize != 8192) + if (clnt->msize != DEFAULT_MSIZE) seq_printf(m, ",msize=%u", clnt->msize); seq_printf(m, ",trans=%s", clnt->trans_mod->name); @@ -139,7 +141,7 @@ static int parse_opts(char *opts, struct p9_client *clnt) int ret = 0; clnt->proto_version = p9_proto_2000L; - clnt->msize = 8192; + clnt->msize = DEFAULT_MSIZE; if (!opts) return 0; From patchwork Sat Sep 4 15:12:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Schoenebeck X-Patchwork-Id: 12475803 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DATE_IN_PAST_03_06, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8711BC4332F for ; Sat, 4 Sep 2021 18:30:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 69DEE60F56 for ; Sat, 4 Sep 2021 18:30:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237380AbhIDSbZ (ORCPT ); Sat, 4 Sep 2021 14:31:25 -0400 Received: from lizzy.crudebyte.com ([91.194.90.13]:60179 "EHLO lizzy.crudebyte.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234085AbhIDSbY (ORCPT ); Sat, 4 Sep 2021 14:31:24 -0400 X-Greylist: delayed 1825 seconds by postgrey-1.27 at vger.kernel.org; Sat, 04 Sep 2021 14:31:24 EDT 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=2PacTOPFHG4uyTsOWJLrF0cv36iJKa7RYdDCEzjZX9k=; b=d+2Or PEGXGJP3Yt2f59HoVYIXXGAFy0rW0BOsPVvLVDxGXLiyPfsybQ2Emm+BOIeoSRTKY4rY8Yiav434d Pnx+HTGky3NXrV0MtdDKoEH14LFLNUqj2iDMbe6gplecx91Kh/snbHWttBetF3+qrDPRcgvnJ+a/V zzYfZBkxv2KNPkz4IZA3W6yt4C1TE47RjgYGGthi8RdZwXSx3XsGdiYLuI/whyBNSJ1P4+FZWKjZa gxc6BAmXEgQkhI5U+PHFaORHfNuCq1IqvxQXebZcea4Qh7kjTfY2rS8y4wfOWjOMDCp6BBtDTmJLh ZDFW0EWWCZw3Jx5CNUkKRbArmkSYw==; Message-Id: <61ea0f0faaaaf26dd3c762eabe4420306ced21b9.1630770829.git.linux_oss@crudebyte.com> In-Reply-To: References: From: Christian Schoenebeck Date: Sat, 4 Sep 2021 17:12:51 +0200 Subject: [PATCH 2/2] net/9p: increase default msize to 128k To: v9fs-developer@lists.sourceforge.net Cc: netdev@vger.kernel.org, Dominique Martinet , Eric Van Hensbergen , Latchesar Ionkov , Greg Kurz Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Let's raise the default msize value to 128k. The 'msize' option defines the maximum message size allowed for any message being transmitted (in both directions) between 9p server and 9p client during a 9p session. Currently the default 'msize' is just 8k, which is way too conservative. Such a small 'msize' value has quite a negative performance impact, because individual 9p messages have to be split up far too often into numerous smaller messages to fit into this message size limitation. A default value of just 8k also has a much higher probablity of hitting short-read issues like: https://gitlab.com/qemu-project/qemu/-/issues/409 Unfortunately user feedback showed that many 9p users are not aware that this option even exists, nor the negative impact it might have if it is too low. Link: https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg01003.html Signed-off-by: Christian Schoenebeck Signed-off-by: Dominique Martinet --- net/9p/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/9p/client.c b/net/9p/client.c index 1cb255587fff..213f12ed76cd 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -30,7 +30,7 @@ #define CREATE_TRACE_POINTS #include -#define DEFAULT_MSIZE 8192 +#define DEFAULT_MSIZE (128 * 1024) /* * Client Option Parsing (code inspired by NFS code)