Re: [PATCH] shrink core hashes on small systems

From: Andrew Morton
Date: Mon Apr 05 2004 - 17:40:07 EST


Matt Mackall <mpm@xxxxxxxxxxx> 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.

That hard-wired breakpoint seems just too arbitrary to me - some sort of
graduated thing which has a little thought and explanation behind it would
be preferred please.

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