Thread (2 messages) 2 messages, 2 authors, 2016-08-20

Re: [RFC PATCH] openvswitch: use percpu flow stats

flat view

From: David Miller <davem@davemloft.net>
Date: 2016-08-20 05:25:04

From: Eric Dumazet <redacted>
Date: Fri, 19 Aug 2016 21:07:52 -0700
Here is an example of a system I had in the past.

8 cpus  (num_possible_cpus() returns 8)

Cpus were numbered : 0, 1, 2, 3, 8, 9, 10, 11  : (nr_cpu_ids = 12)

I am pretty sure they are still alive.

Since you want an array indexed by cpu numbers, you need to size it by
nr_cpu_ids, otherwise array[11] will crash / access garbage.

This is why you find many nr_cpu_ids in the linux tree, not
num_possible_cpus() to size arrays.
My bad, I misunderstood what nr_cpu_ids means.  You are absolutely right.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help