Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp282370imm; Tue, 31 Jul 2018 18:48:24 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf5ByhlfAleUBnX9hVp1Et7J2hCt/E08gH1RhssdSF3rcP2cWz6mdvrImCtPDa8W1KpG8Uw X-Received: by 2002:a63:cb04:: with SMTP id p4-v6mr21968101pgg.197.1533088104490; Tue, 31 Jul 2018 18:48:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533088104; cv=none; d=google.com; s=arc-20160816; b=iRIN2ngSwFLF9v7CaTHjxoNx9DLmZsA9QD892Xr78Han7cNtiTHrDcgaPtay33DG1C u1yRHF9r7DZU7wFfeShPrZsDPq+jUjHt5iOTPjlrgXvqTQ2dinA2r7cJTVCiKCibUjXd 9U7WIJB+Qatgt85rxN1dH6H0+xGX4S06j2ycD0bLpX4VKOjrFnsITqN8de/jT0jJF/v7 Z8lYWLqxEPl23AAu1iM8TKNPbLoIARnJ34APNpSpar8J8k86HB+biV0zlqs7wtlCc0xk aoER2MX2vo5EpzmuyL1SwDuQemFq3rlUbRawyEvf9P1KPOeGePRn32EHMxAXC1lc+wWQ U/NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:subject:arc-authentication-results; bh=LnKiG2Tf8IvwoWxD0LkMmImjXdGgcs2Gh4MhWjASVWE=; b=R/kt/HbiOqzgHyDLpPvgrVn9ExC4gLJcO2cmkNtSEVYIv6KDT2UPRJt80j789xBFSa v46/IEqAHNHLkj+vucaX9AFiWr2d3vot+IwVeo+bW35Pml7a2+xveXiEaa5CBVm8untc dR3S/oQMxwfI/hl+ZSpkWUBfcl5de6jSDzXjFgTHF49BCFQjLQQ2kXgqDg+gly4qcykj 5+eoZIsbJTNDeC5PvJyz7IZicqGr44yxV57jBYyzFNit1x5XD8wFEIga0gvFPOMR9Ch9 PQ6yapIxmuFIKX2sa1ke4Zi4JLqQS37/fAjIFbRmxe0SBK8GBtyEwua7wbO746rDWXDc djpQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a64-v6si15886611pfb.224.2018.07.31.18.48.10; Tue, 31 Jul 2018 18:48:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732984AbeHADa2 (ORCPT + 99 others); Tue, 31 Jul 2018 23:30:28 -0400 Received: from tama500.ecl.ntt.co.jp ([129.60.39.148]:37870 "EHLO tama500.ecl.ntt.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732881AbeHADa2 (ORCPT ); Tue, 31 Jul 2018 23:30:28 -0400 Received: from vc2.ecl.ntt.co.jp (vc2.ecl.ntt.co.jp [129.60.86.154]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id w711lIre032758; Wed, 1 Aug 2018 10:47:18 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id DABFB638588; Wed, 1 Aug 2018 10:47:18 +0900 (JST) Received: from jcms-pop21.ecl.ntt.co.jp (jcms-pop21.ecl.ntt.co.jp [129.60.87.134]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id CEECE638577; Wed, 1 Aug 2018 10:47:18 +0900 (JST) Received: from [IPv6:::1] (unknown [129.60.241.146]) by jcms-pop21.ecl.ntt.co.jp (Postfix) with ESMTPSA id C813F4006E3; Wed, 1 Aug 2018 10:47:18 +0900 (JST) Subject: Re: [PATCH net-next 2/2] virtio-net: get rid of unnecessary container of rq stats References: <1533030219-9904-1-git-send-email-jasowang@redhat.com> <1533030219-9904-2-git-send-email-jasowang@redhat.com> From: Toshiaki Makita Message-ID: <840e6834-f64f-56b4-a889-d73e204eacbd@lab.ntt.co.jp> Date: Wed, 1 Aug 2018 10:46:53 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-CC-Mail-RelayStamp: 1 To: Jason Wang Cc: mst@redhat.com, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org X-TM-AS-MML: disable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/08/01 10:39, Jason Wang wrote: > On 2018年07月31日 18:02, Toshiaki Makita wrote: >> On 2018/07/31 18:43, Jason Wang wrote: >>> We don't maintain tx counters in rx stats any more. There's no need >>> for an extra container of rq stats. >>> >>> Cc: Toshiaki Makita >>> Signed-off-by: Jason Wang >>> --- >>>   drivers/net/virtio_net.c | 80 >>> ++++++++++++++++++++++-------------------------- >>>   1 file changed, 36 insertions(+), 44 deletions(-) >>> >>> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c >>> index 72d3f68..14f661c 100644 >>> --- a/drivers/net/virtio_net.c >>> +++ b/drivers/net/virtio_net.c >>> @@ -87,7 +87,8 @@ struct virtnet_sq_stats { >>>       u64 kicks; >>>   }; >>>   -struct virtnet_rq_stat_items { >>> +struct virtnet_rq_stats { >>> +    struct u64_stats_sync syncp; >>>       u64 packets; >>>       u64 bytes; >>>       u64 drops; >>> @@ -98,17 +99,8 @@ struct virtnet_rq_stat_items { >>>       u64 kicks; >>>   }; >>>   -struct virtnet_rq_stats { >>> -    struct u64_stats_sync syncp; >>> -    struct virtnet_rq_stat_items items; >>> -}; >> I'm not thinking removing sq stat is needed but even if it is I want to >> keep virtnet_rq_stats to avoid allocating unnecessary u64_stats_syncp on >> stack in virtnet_receive. I would just remove virtnet_rx_stats if >> necessary. > > It's a nop on 64bit machines. And an unsigned on 32bit. So it's overhead > could be ignored I think. It's not a big problem so that's OK. I just felt like you reverted unnecessarily too much. Anyway it is already applied and I'm not thinking of changing this any more. -- Toshiaki Makita