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>
This commit is contained in:

committed by
David S. Miller

parent
bec94d430f
commit
8274a97aa4
@@ -67,7 +67,7 @@ static int __net_init fib4_rules_init(struct net *net)
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
kfree(local_table);
|
||||
fib_free_table(local_table);
|
||||
return -ENOMEM;
|
||||
}
|
||||
#else
|
||||
|
Reference in New Issue
Block a user