[PATCH] Sanely size hash tables when using large base pages. take 2.

2007-01-02 Thread Paul Mundt
This is a resubmission of the earlier patch with the pidhash bits dropped. At the moment the inode/dentry cache hash tables (common by way of alloc_large_system_hash()) are incorrectly sized by their respective detection logic when we attempt to use large base pages on systems with little memory.

Re: [PATCH] Sanely size hash tables when using large base pages.

2006-12-27 Thread Paul Mundt
On Tue, Dec 26, 2006 at 03:42:57PM +0800, Fengguang Wu wrote: > On Tue, Dec 26, 2006 at 03:16:52PM +0900, Paul Mundt wrote: > > pidhash_shift = max(4, fls(megabytes * 4)); > > pidhash_shift = min(12, pidhash_shift); > > pidhash_size = 1 << pidhash_shift; > > > > + size = pidhash_siz

Re: [PATCH] Sanely size hash tables when using large base pages.

2006-12-25 Thread Fengguang Wu
Hi Paul, On Tue, Dec 26, 2006 at 03:16:52PM +0900, Paul Mundt wrote: > pidhash_shift = max(4, fls(megabytes * 4)); > pidhash_shift = min(12, pidhash_shift); > pidhash_size = 1 << pidhash_shift; > > + size = pidhash_size * sizeof(struct hlist_head); > + if (unlikely(size

[PATCH] Sanely size hash tables when using large base pages.

2006-12-25 Thread Paul Mundt
At the moment both the pidhash and inode/dentry cache hash tables (common by way of alloc_large_system_hash()) are incorrectly sized by their respective detection logic when we attempt to use large base pages on systems with little memory. This results in odd behaviour when using a 64kB PAGE_SIZE,