From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423468AbbEOCuD (ORCPT ); Thu, 14 May 2015 22:50:03 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:44181 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423235AbbEOCuA (ORCPT ); Thu, 14 May 2015 22:50:00 -0400 Date: Thu, 14 May 2015 22:49:58 -0400 (EDT) Message-Id: <20150514.224958.144644873953606975.davem@davemloft.net> To: sixiao@microsoft.com Cc: kys@microsoft.com, haiyangz@microsoft.com, devel@linuxdriverproject.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next,v2,1/1] hv_netvsc: use per_cpu stats to calculate TX/RX data From: David Miller In-Reply-To: <1431590425-23889-1-git-send-email-sixiao@microsoft.com> References: <1431590425-23889-1-git-send-email-sixiao@microsoft.com> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 14 May 2015 19:50:00 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Simon Xiao Date: Thu, 14 May 2015 01:00:25 -0700 > Current code does not lock anything when calculating the TX and RX stats. > As a result, the RX and TX data reported by ifconfig are not accuracy in a > system with high network throughput and multiple CPUs (in my test, > RX/TX = 83% between 2 HyperV VM nodes which have 8 vCPUs and 40G Ethernet). > > This patch fixed the above issue by using per_cpu stats. > netvsc_get_stats64() summarizes TX and RX data by iterating over all CPUs > to get their respective stats. > > This v2 patch addressed David's comments on the cleanup path when > netdev_alloc_pcpu_stats() failed. > > Signed-off-by: Simon Xiao > Reviewed-by: K. Y. Srinivasan > Reviewed-by: Haiyang Zhang Applied, thanks.