Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3331577rwb; Tue, 16 Aug 2022 00:27:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR7PFL+l1DYvCaojbPVY4UEO0ctBeTLlKQB0mBxXOuojFSzhi+YUbuPg2+7qiBSA0S2OEwFJ X-Received: by 2002:a05:6402:84e:b0:440:4bac:be5a with SMTP id b14-20020a056402084e00b004404bacbe5amr17617815edz.103.1660634824287; Tue, 16 Aug 2022 00:27:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660634824; cv=none; d=google.com; s=arc-20160816; b=M4/HMyx9UWmPtJ/iWZW6sNYbWWVP4H5rlS+/uKrbG6TTwVEEckA2k+/wBmMzEhGncC xWL4oAXVzSZgtlSTLokIwXRjWZe2aahSqI6B6+VKwikB8/b2KSCmDJ4UCODjGxmHl2pp TdrOvVQJfKmDgHcBJfdLH8DGOrSU6K/EoI5S0IGK4YPclHz5Xjts/XXiOtiFCDTXWbqz vdn5fhmtvUJDLIakj0t69k7HW+do+t3yF6wrj2Sg27R2q9VIL+lcOWS+BmfkNaezuSua PIbjFgfhCpMFRONuefw4vxpnmGVibEPh0YUORSYSKUdg57a5Tlmz8zKMQE1RkXq7lPnb 1g6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:cc:to:from:date:subject :message-id; bh=Na7zcnT0X/rE8H7gzonllG7PL8D0Jw3wBABN2Dv7fiw=; b=wnnYWeGxJ4WbSJHdgczZufNKPJ2VepAS+DVnWTpJI0YqQHUYmireIBTsYsUWdNQpMZ O0ROntHZAftx/H3cMMDC+/ME5Sl0d2Q5Mk0M86GjdzSrr1Q6yOab+rrLetUpOZAYtBnn kkhirBP2qr+kkKQOfoO611OrHKSH+LMPAIOvuZSRWm3uZlbJMQUCvN1eAbcujbzdLJgT xEXtXc4x9Z+h7zfIlxLxpBCM+U4BHFNULS7d72nUPy/WuLcz/rG8E6qfj84UbV2I7+1R qf0zZTjgDM8jCMbE1dRIYbLesupEcIhRBwt9ZBdl4WXmd8hZ7ekdKxILCMmHvmJQxhZT 7LjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m13-20020a056402430d00b0043bb9893d78si10539139edc.246.2022.08.16.00.26.38; Tue, 16 Aug 2022 00:27:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230322AbiHPGyY (ORCPT + 99 others); Tue, 16 Aug 2022 02:54:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231153AbiHPGyG (ORCPT ); Tue, 16 Aug 2022 02:54:06 -0400 Received: from out30-42.freemail.mail.aliyun.com (out30-42.freemail.mail.aliyun.com [115.124.30.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFE6E2075B7; Mon, 15 Aug 2022 20:09:13 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R361e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=xuanzhuo@linux.alibaba.com;NM=1;PH=DS;RN=15;SR=0;TI=SMTPD_---0VMOG.Le_1660619347; Received: from localhost(mailfrom:xuanzhuo@linux.alibaba.com fp:SMTPD_---0VMOG.Le_1660619347) by smtp.aliyun-inc.com; Tue, 16 Aug 2022 11:09:08 +0800 Message-ID: <1660619231.7656944-2-xuanzhuo@linux.alibaba.com> Subject: Re: [PATCH v3 0/5] virtio: drop sizing vqs during init Date: Tue, 16 Aug 2022 11:07:11 +0800 From: Xuan Zhuo To: "Michael S. Tsirkin" Cc: Jason Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, Linus Torvalds , Jens Axboe , James Bottomley , "Martin K. Petersen" , Guenter Roeck , Greg KH , linux-kernel@vger.kernel.org References: <20220815215938.154999-1-mst@redhat.com> In-Reply-To: <20220815215938.154999-1-mst@redhat.com> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Series: Reviewed-by: Xuan Zhuo There is also a commit, I just submitted, about the problem you pointed out about using container_of(). Can we submit together? On Mon, 15 Aug 2022 18:00:21 -0400, "Michael S. Tsirkin" wrote: > Reporting after I botched up v2 posting. Sorry about the noise. > > Supplying size during init does not work for all transports. > In fact for legacy pci doing that causes a memory > corruption which was reported on Google Cloud. > > We might get away with changing size to size_hint so it's > safe to ignore and then fixing legacy to ignore the hint. > > But the benefit is unclear in any case, so let's revert for now. > Any new version will have to come with > - documentation of performance gains > - performance testing showing existing workflows > are not harmed materially. especially ones with > bursty traffic > - report of testing on legacy devices > > > Huge shout out to Andres Freund for the effort spent reproducing and > debugging! Thanks to Guenter Roeck for help with testing! > > > changes from v2 > drop unrelated patches > changes from v1 > revert the ring size api, it's unused now > > Michael S. Tsirkin (5): > virtio_net: Revert "virtio_net: set the default max ring size by > find_vqs()" > virtio: Revert "virtio: add helper virtio_find_vqs_ctx_size()" > virtio-mmio: Revert "virtio_mmio: support the arg sizes of find_vqs()" > virtio_pci: Revert "virtio_pci: support the arg sizes of find_vqs()" > virtio: Revert "virtio: find_vqs() add arg sizes" > > arch/um/drivers/virtio_uml.c | 2 +- > drivers/net/virtio_net.c | 42 +++--------------------- > drivers/platform/mellanox/mlxbf-tmfifo.c | 1 - > drivers/remoteproc/remoteproc_virtio.c | 1 - > drivers/s390/virtio/virtio_ccw.c | 1 - > drivers/virtio/virtio_mmio.c | 9 ++--- > drivers/virtio/virtio_pci_common.c | 20 +++++------ > drivers/virtio/virtio_pci_common.h | 3 +- > drivers/virtio/virtio_pci_legacy.c | 6 +--- > drivers/virtio/virtio_pci_modern.c | 17 +++------- > drivers/virtio/virtio_vdpa.c | 1 - > include/linux/virtio_config.h | 26 +++------------ > 12 files changed, 28 insertions(+), 101 deletions(-) > > -- > MST >