From: Eric Dumazet Date: Thu, 14 Oct 2010 20:53:04 +0000 (+0000) Subject: fib_hash: embed initial hash table in fn_zone X-Git-Tag: v2.6.37-rc1~147^2~120 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bef83edfba72ba58b42c14fb046da2199574bc0;p=pandora-kernel.git fib_hash: embed initial hash table in fn_zone While looking for false sharing problems, I noticed sizeof(struct fn_zone) was small (28 bytes) and possibly sharing a cache line with an often written kernel structure. Most of the time, fn_zone uses its initial hash table of 16 slots. We can avoid the false sharing problem by embedding this initial hash table in fn_zone itself, so that sizeof(fn_zone) > L1_CACHE_BYTES We did a similar optimization in commit a6501e080c (Reduce memory needs and speedup lookups) Add a fz_revorder field to speedup fn_hash() a bit. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- Reading git-diff-tree failed