linux/include
David S. Miller 2518c7c2b3 [XFRM]: Hash policies when non-prefixed.
This idea is from Alexey Kuznetsov.

It is common for policies to be non-prefixed.  And for
that case we can optimize lookups, insert, etc. quite
a bit.

For each direction, we have a dynamically sized policy
hash table for non-prefixed policies.  We also have a
hash table on policy->index.

For prefixed policies, we have a list per-direction which
we will consult on lookups when a non-prefix hashtable
lookup fails.

This still isn't as efficient as I would like it.  There
are four immediate problems:

1) Lots of excessive refcounting, which can be fixed just
   like xfrm_state was
2) We do 2 hash probes on insert, one to look for dups and
   one to allocate a unique policy->index.  Althought I wonder
   how much this matters since xfrm_state inserts do up to
   3 hash probes and that seems to perform fine.
3) xfrm_policy_insert() is very complex because of the priority
   ordering and entry replacement logic.
4) Lots of counter bumping, in addition to policy refcounts,
   in the form of xfrm_policy_count[].  This is merely used
   to let code path(s) know that some IPSEC rules exist.  So
   this count is indexed per-direction, maybe that is overkill.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-09-22 15:08:48 -07:00
..
acpi Pull acpi_os_allocate into test branch 2006-07-10 02:39:47 -04:00
asm-alpha [HEADERS] One line per header in Kbuild files to reduce conflicts 2006-09-19 12:43:58 +01:00
asm-arm [ARM] 3815/1: headers_install support for ARM 2006-09-18 16:28:50 +01:00
asm-arm26 [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
asm-cris [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
asm-frv [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
asm-generic [HEADERS] One line per header in Kbuild files to reduce conflicts 2006-09-19 12:43:58 +01:00
asm-h8300 [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
asm-i386 [HEADERS] One line per header in Kbuild files to reduce conflicts 2006-09-19 12:43:58 +01:00
asm-ia64 [HEADERS] One line per header in Kbuild files to reduce conflicts 2006-09-19 12:43:58 +01:00
asm-m32r [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
asm-m68k [PATCH] Fix 'make headers_check' on ia64 2006-09-19 07:59:59 -07:00
asm-m68knommu [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
asm-mips [PATCH] headers_check: fix userspace build of asm-mips/page.h 2006-09-13 07:32:16 -07:00
asm-parisc [PATCH] headers_check: Clean up asm-parisc/page.h for user headers 2006-09-19 07:59:59 -07:00
asm-powerpc Merge git://git.infradead.org/~dwmw2/hdroneline 2006-09-22 12:56:22 -07:00
asm-ppc [POWERPC] 40x: Fix debug status register defines 2006-09-21 22:59:39 +10:00
asm-s390 Merge git://git.infradead.org/~dwmw2/hdroneline 2006-09-22 12:56:22 -07:00
asm-sh [PATCH] sh: fix FPN_START typo 2006-09-08 10:22:50 -07:00
asm-sh64 sh64: Use generic BUG_ON()/WARN_ON(). 2006-09-12 14:38:23 +09:00
asm-sparc [HEADERS] One line per header in Kbuild files to reduce conflicts 2006-09-19 12:43:58 +01:00
asm-sparc64 [HEADERS] One line per header in Kbuild files to reduce conflicts 2006-09-19 12:43:58 +01:00
asm-um Merge git://git.infradead.org/hdrinstall-2.6 2006-07-04 12:55:45 -07:00
asm-v850 [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
asm-x86_64 [HEADERS] One line per header in Kbuild files to reduce conflicts 2006-09-19 12:43:58 +01:00
asm-xtensa [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
crypto [CRYPTO] digest: Added user API for new hash type 2006-09-21 11:46:17 +10:00
keys
linux [XFRM]: Dynamic xfrm_state hash table sizing. 2006-09-22 15:08:41 -07:00
math-emu
media V4L/DVB (4605): Fixes an issue with V4L1 and make headers-install 2006-09-10 13:45:55 -03:00
mtd Merge git://git.infradead.org/~dwmw2/hdroneline 2006-09-22 12:56:22 -07:00
net [XFRM]: Hash policies when non-prefixed. 2006-09-22 15:08:48 -07:00
pcmcia
rdma [HEADERS] One line per header in Kbuild files to reduce conflicts 2006-09-19 12:43:58 +01:00
rxrpc
scsi [HEADERS] One line per header in Kbuild files to reduce conflicts 2006-09-19 12:43:58 +01:00
sound [HEADERS] One line per header in Kbuild files to reduce conflicts 2006-09-19 12:43:58 +01:00
video [HEADERS] One line per header in Kbuild files to reduce conflicts 2006-09-19 12:43:58 +01:00
Kbuild [HEADERS] One line per header in Kbuild files to reduce conflicts 2006-09-19 12:43:58 +01:00