[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SN6PR2101MB11358FB238704629F7E5BC07847E0@SN6PR2101MB1135.namprd21.prod.outlook.com>
Date: Wed, 13 Jun 2018 21:07:40 +0000
From: Yidong Ren <Yidong.Ren@...rosoft.com>
To: Eric Dumazet <eric.dumazet@...il.com>,
Yidong Ren <yidren@...uxonhyperv.com>,
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>
Subject: RE: [PATCH v2] hv_netvsc: Add per-cpu ethtool stats for netvsc
> From: Eric Dumazet <eric.dumazet@...il.com>
> You actually want to allocate memory local to this cpu, possibly in one chunk,
> not spread all over the places.
>
> kvmalloc(nr_cpu_ids * sizeof(struct netvsc_ethtool_pcpu_stats)) should be
> really better, since it would most of the time be satisfied by a single kmalloc()
Got it. I'm just trying to allocate memory for each cpu. It doesn't have to be __percpu variable.
Powered by blists - more mailing lists