fib_trie: Update usage stats to be percpu instead of global variables
authorAlexander Duyck <alexander.h.duyck@redhat.com>
Wed, 31 Dec 2014 18:55:29 +0000 (10:55 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Dec 2014 23:25:53 +0000 (18:25 -0500)
commit8274a97aa4c694ad0d7b31b283a89dcca140e62b
treee97afff8ea3e1e16e99d8cefe98b373e886534f0
parentbec94d430f2c97159e21e38c0f1fa4da3710d5e1
fib_trie: Update usage stats to be percpu instead of global variables

The trie usage stats were currently being shared by all threads that were
calling fib_table_lookup.  As a result when multiple threads were
performing lookups simultaneously the trie would begin to cache bounce
between those threads.

In order to prevent this I have updated the usage stats to use a set of
percpu variables.  By doing this we should be able to avoid the cache
bouncing and still make use of these stats.

Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_frontend.c
net/ipv4/fib_trie.c