From: Chris Wedgwood <cw@f00f.org>
To: Anton Blanchard <anton@samba.org>
Cc: akpm@osdl.org, paulus@samba.org, torvalds@osdl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix ppc64 max_pfn issue
Date: Fri, 23 Jul 2004 23:08:02 -0700 [thread overview]
Message-ID: <20040724060802.GA31385@taniwha.stupidest.org> (raw)
In-Reply-To: <20040724044720.GF4556@krispykreme>
On Sat, Jul 24, 2004 at 02:47:20PM +1000, Anton Blanchard wrote:
> I noticed excessive time in the pid hash functions on a ppc64
> box. It turns out the pid hash is being sized way too small, eg on a
> 16GB box:
This reminds me (that someone pointed out to me, I forget who) that in
pid.c we have:
void __init pidhash_init(void)
{
int i, j, pidhash_size;
unsigned long megabytes = max_pfn >> (20 - PAGE_SHIFT);
pidhash_shift = max(4, fls(megabytes * 4));
pidhash_shift = min(12, pidhash_shift);
pidhash_size = 1 << pidhash_shift;
which isn't strictly correct for machines with sparse/discontiguous
memory as max_pfn may have very little bearing on the overall memory
size.
Since we cap it at 1<<12 I guess the platform affected might be ARM
where you would otherwise get a smaller hash size. That said, I
wonder if a shift of 12 suffices for really large machines with many
many processes.
--cw
next prev parent reply other threads:[~2004-07-24 6:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-24 4:47 Anton Blanchard
2004-07-24 6:08 ` Chris Wedgwood [this message]
2004-07-24 6:15 ` Anton Blanchard
2004-07-24 15:39 ` Anton Blanchard
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=20040724060802.GA31385@taniwha.stupidest.org \
--to=cw@f00f.org \
--cc=akpm@osdl.org \
--cc=anton@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=torvalds@osdl.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
all inboxes | Powered by JetHome®