diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-10-20 18:03:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-21 06:09:41 -0400 |
commit | 9b0c290e78d667e6a483bde8c7cef7dd15f49017 (patch) | |
tree | ed68f6cbcc9a512106217694b16a846147cdf54a /net/ipv4/fib_hash.c | |
parent | 7b5edbc4cfe2297b0915adea5aa1eafcafadbf06 (diff) |
fib: introduce fib_alias_accessed() helper
Perf tools session at NFWS 2010 pointed out a false sharing on struct
fib_alias that can be avoided pretty easily, if we set FA_S_ACCESSED bit
only if needed (ie : not already set)
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_hash.c')
-rw-r--r-- | net/ipv4/fib_hash.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c index 4f1aafd3ba89..43e1c594ce8f 100644 --- a/net/ipv4/fib_hash.c +++ b/net/ipv4/fib_hash.c | |||
@@ -335,7 +335,8 @@ void fib_table_select_default(struct fib_table *tb, | |||
335 | if (!next_fi->fib_nh[0].nh_gw || | 335 | if (!next_fi->fib_nh[0].nh_gw || |
336 | next_fi->fib_nh[0].nh_scope != RT_SCOPE_LINK) | 336 | next_fi->fib_nh[0].nh_scope != RT_SCOPE_LINK) |
337 | continue; | 337 | continue; |
338 | fa->fa_state |= FA_S_ACCESSED; | 338 | |
339 | fib_alias_accessed(fa); | ||
339 | 340 | ||
340 | if (fi == NULL) { | 341 | if (fi == NULL) { |
341 | if (next_fi != res->fi) | 342 | if (next_fi != res->fi) |