From: Matt Mackall <mpm@selenic.com>
To: Andrew Morton <akpm@osdl.org>, arjanv@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] shrink core hashes on small systems
Date: Mon, 5 Apr 2004 17:59:11 -0500 [thread overview]
Message-ID: <20040405225911.GJ6248@waste.org> (raw)
In-Reply-To: <20040405143824.7f9b7020.akpm@osdl.org>
On Mon, Apr 05, 2004 at 02:38:24PM -0700, Andrew Morton wrote:
> Matt Mackall <mpm@selenic.com> wrote:
> >
> > Longer term, I think some serious thought needs to go into scaling
> > hash sizes across the board, but this serves my purposes on the
> > low-end without changing behaviour asymptotically.
>
> Can we make longer-term a bit shorter? init_per_zone_pages_min() only took
> a few minutes thinking..
>
> I suspect what we need is to replace num_physpages with nr_free_pages(),
> then account for PAGE_SIZE, then muck around with sqrt() for a while then
> apply upper and lower bounds to it.
Ok, I can take a look at that. I believe Arjan's been looking at the
upper end side of the equation.
On the small end, I think we need to take account for the fact
that:
- a bunch of stuff gets effectively pinned post-init
- there are fewer pages total so paging granularity is bad
- the desired size/performance ratio is heavily skewed towards size
..so I think the head of this curve is squeezing most of these hashes
down to order 0 or 1 for the first 16MB of RAM or so.
On the large end, we obviously have diminishing returns for larger
hashes and lots of dirty cachelines for hash misses. We almost
certainly want sublinear growth here, but sqrt might be too
aggressive. Arjan?
For 2.7, I've been thinking about pulling out a generic lookup API,
which would allow replacing hashing with something like rbtree, etc.,
depending on space and performance criterion.
--
Matt Mackall : http://www.selenic.com : Linux development and consulting
next prev parent reply other threads:[~2004-04-05 22:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-05 20:49 [PATCH] shrink core hashes on small systems Matt Mackall
2004-04-05 21:02 ` Andrew Morton
2004-04-05 21:19 ` Matt Mackall
2004-04-05 21:38 ` Andrew Morton
2004-04-05 22:59 ` Matt Mackall [this message]
2004-04-06 6:31 ` Bryan Rittmeyer
2004-04-07 5:21 ` Marcelo Tosatti
2004-04-07 18:10 ` Matt Mackall
2004-04-07 22:53 ` Benjamin Herrenschmidt
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=20040405225911.GJ6248@waste.org \
--to=mpm@selenic.com \
--cc=akpm@osdl.org \
--cc=arjanv@redhat.com \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.