From: Robin Holt <holt@sgi.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Robin Holt <holt@sgi.com>,
linux-kernel@vger.kernel.org, Pavel Emelyanov <xemul@openvz.org>,
Oleg Nesterov <oleg@tv-sign.ru>,
Sukadev Bhattiprolu <sukadev@us.ibm.com>,
Paul Menage <menage@google.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [Patch] Scale pidhash_shift/pidhash_size up based on num_possible_cpus().
Date: Thu, 31 Jul 2008 14:32:04 -0500 [thread overview]
Message-ID: <20080731193204.GG9663@sgi.com> (raw)
In-Reply-To: <m1prot297c.fsf@frodo.ebiederm.org>
On Thu, Jul 31, 2008 at 11:35:19AM -0700, Eric W. Biederman wrote:
> Robin Holt <holt@sgi.com> writes:
>
> > For large cpu configurations, we find the number of pids in a pidhash
> > bucket cause things like 'ps' to perform slowly. Raising pidhash_shift
> > from 12 to 16 cut the time for 'ps' in half on a 2048 cpu machine.
> >
> > This patch makes the upper limit scale based upon num_possible_cpus().
> > For machines 128 cpus or less, the current upper limit of 12 is
> > maintained.
>
> It looks like there is a magic limit we are dancing around.
>
> Can we please make the maximum for the hash table size be based
> on the maximum number of pids. That is fls(PID_MAX_LIMIT) - 6?
I am happy to base it upon whatever you think is correct. So long as it
goes up for machines with lots of cpus, that will satisfy me. It is
probably as much a problem on smaller machines, but if you have _THAT_
many pids in use, you are probably oversubscribing many other resources
and don't really care. That limit will essentially become a constant
(compiler may even do that for us but I have not checked any arch other
that ia64). Should I just replace the 12 with a 16 or 17 or some new
magic number?
Thanks,
Robin
next prev parent reply other threads:[~2008-07-31 19:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-31 17:00 [Patch] Scale pidhash_shift/pidhash_size up based on num_possible_cpus() Robin Holt
2008-07-31 18:35 ` Eric W. Biederman
2008-07-31 19:32 ` Robin Holt [this message]
2008-07-31 19:49 ` Eric W. Biederman
2008-07-31 20:08 ` Robin Holt
2008-07-31 22:04 ` Eric W. Biederman
2008-08-01 12:04 ` Robin Holt
2008-08-01 18:27 ` Eric W. Biederman
2008-08-01 19:13 ` Robin Holt
2008-08-01 19:59 ` Eric W. Biederman
2008-08-04 13:11 ` Stephen Champion
2008-08-04 20:36 ` Eric W. Biederman
2008-08-04 23:58 ` Robin Holt
2008-08-05 0:38 ` Eric W. Biederman
2008-08-06 3:21 ` Stephen Champion
2008-08-01 18:49 ` Linus Torvalds
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=20080731193204.GG9663@sgi.com \
--to=holt@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.com \
--cc=oleg@tv-sign.ru \
--cc=sukadev@us.ibm.com \
--cc=torvalds@linux-foundation.org \
--cc=xemul@openvz.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