[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SN6PR2101MB11358F7DD4472E25E76DA76084540@SN6PR2101MB1135.namprd21.prod.outlook.com>
Date: Wed, 25 Jul 2018 22:54:04 +0000
From: Yidong Ren <Yidong.Ren@...rosoft.com>
To: Vitaly Kuznetsov <vkuznets@...hat.com>
CC: KY Srinivasan <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
"David S. Miller" <davem@...emloft.net>,
"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Madhan Sivakumar <madhans@...rosoft.com>
Subject: RE: [PATCH v3] hv_netvsc: Add per-cpu ethtool stats for netvsc
> From: Vitaly Kuznetsov <vkuznets@...hat.com>
> While you do for_each_present_cpu() in netvsc_get_ethtool_stats(),
> netvsc_get_pcpu_stats() does for_each_possible_cpu(). This looks
> inconsistent.
I made a mistake there. Thanks for catch me.
> The allocation you're doing here is short-lived so I would suggest you use
> possible_cpus everywhere. Even knowing there's no CPU hotplug on Hyper-
> V at this moment, it can appear later and we'll get a hard-to-find issue.
> Moreover, we may consider using netvsc driver on e.g. KVM with Hyper-V
> enlightenments and KVM has CPU hotplug already.
That would cause the output to be very long and useless.
I will submit a revision that allocates for num_possible_cpus, but only copy out stats for each present cpu.
-Yidong
Powered by blists - more mailing lists