[SSSD] [PATCH] mmap_cache: Use two chains for hash collision.

Simo Sorce simo at redhat.com
Wed Sep 11 13:39:41 UTC 2013


On Wed, 2013-09-11 at 12:24 +0200, Lukas Slebodnik wrote:
> ehlo,
> 
> Two patches are attached.
> 
> The 1st patch reverts commit 4662725ffef62b3b2502481438effa7c8fef9f80.
> "mmap_cache: Skip records which doesn't have same hash"
>  --next patch lokks nicer with recerted commit 4662725ffe
> 
> 
> The 2nd patch changes behaviour of record chaining.
> 
> LS

NACK, you cannot just change the record structure w/o bumping the whole
mmap MAJOR version number.

Aside:

If we are not I am thinking whether we should do some other
optimizations to keep the size down.

For example, hashes are generally relatively small quantities as we do
not allow huge tables. If we can limit tables size to a max of 65k
elements we could change the hash type from uint32_t to uint16_t, and
end up using the same size we are using now.
We already limit the total mmap size to 4G as rel_prt_t is a uint32_t,
and in practice we'll never allow maps with a very large size as it eats
into the memory available to 32 bit processes.
So perhaps 65k for the hash tables is an acceptable limit. (I think we
currently have a 100k limit which is probably a little bit overblown as
a default anyway.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York




More information about the sssd-devel mailing list