On Mon, Apr 04, 2005 at 12:38:03PM +0200, Robert Olsson wrote:
>
> This is likely to happen in rt_intern_hash? I don't see how this can
> get along with chain-pruning there?
What I'm trying to catch is the case when you've got x number of
entries in the table and a large fraction of them are all in one
chain.
This does not conflict with the goal of keeping the chains short.
Even if you strictly allow only 8 entries per chain, it's trivial
to exceed 8 times the average chain length.
Remember the average chain length can be fractions like 0.1. Of
course we need to set a minimum value that the chain needs to
grow beyond before this check kicks in.
> IMO the thoughts of extending in-flow GC etc are interesting and can
> hopefully give us more robust performance.
Indeed, it looks like Alexey has already put the code there. It just
needs to be made more strict :) It needs to free entries even if they
are in use.
After all, freeing an entry in use can't be much worse than not having
a cache at all. OTOH, having a very long chain is definitely much worse
than not having a cache :)
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
|