lkml.org 
[lkml]   [2006]   [Dec]   [26]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 26 Dec 2006 15:42:57 +0800
FromFengguang Wu <>
SubjectRe: [PATCH] Sanely size hash tables when using large base pages.
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 < PAGE_SIZE)) {
> +		size = PAGE_SIZE;
> +		pidhash_size = size / sizeof(struct hlist_head);
> +		pidhash_shift = 0;

But pidhash_shift is not the order of page ;-)

Regards,
Wu
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-12-26 08:57    [from the cache]
©2003-2008