linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Fengguang Wu <fengguang.wu@gmail.com>
To: Paul Mundt <lethal@linux-sh.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] Sanely size hash tables when using large base pages.
Date: Tue, 26 Dec 2006 15:42:57 +0800	[thread overview]
Message-ID: <367118962.32541@ustc.edu.cn> (raw)
Message-ID: <20061226074257.GA5853@mail.ustc.edu.cn> (raw)
In-Reply-To: <20061226061652.GA598@linux-sh.org>

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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2006-12-26  7:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-26  6:16 Paul Mundt
     [not found] ` <20061226074257.GA5853@mail.ustc.edu.cn>
2006-12-26  7:42   ` Fengguang Wu [this message]
2006-12-28  0:29   ` Paul Mundt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=367118962.32541@ustc.edu.cn \
    --to=fengguang.wu@gmail.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox