[PATCH v2] hv_netvsc: Add per-cpu ethtool stats for netvsc

Yidong Ren Yidong.Ren at microsoft.com
Wed Jun 13 21:07:40 UTC 2018


> From: Eric Dumazet <eric.dumazet at gmail.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.


More information about the devel mailing list