lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 Jan 2008 07:58:24 +0100
From:	Eric Dumazet <>
To:	"David S. Miller" <>
CC:	Linux Netdev List <>
Subject: [IPV4] FIB_HASH: Reduce memory needs and speedup lookups

Hi David

CONFIG_FIB_HASH=y being default configuration, we can still work on it.

Thank you

[IPV4] FIB_HASH: Reduce memory needs and speedup lookups

Currently, sizeof(struct fib_alias) is 24 or 48 bytes on 32/64 bits arches.

Because of SLAB_HWCACHE_ALIGN requirement, these are rounded to 32 and 64 
bytes respectively.

This patch moves rcu to the end of fib_alias, and conditionally defines it 

We also remove SLAB_HWCACHE_ALIGN requirement for fib_alias and fib_node 
objects because it is not necessary.

(BTW SLUB currently denies it for objects smaller than cache_line_size() / 2,
but not SLAB)

Finally, sizeof(fib_alias) go back to 16 and 32 bytes.

Then, we can embed one fib_alias on each fib_node, to favor locality.
Most of the time access to the fib_alias will be free because one cache line
contains both the list head (fn_alias) and (one of) the list element.

Signed-off-by: Eric Dumazet <>

  net/ipv4/fib_hash.c   |   33 ++++++++++++++++++++-------------
  net/ipv4/fib_lookup.h |    4 +++-
  2 files changed, 23 insertions(+), 14 deletions(-)

View attachment "fib_hash.patch" of type "text/plain" (3290 bytes)

Powered by blists - more mailing lists