Extreme Sparsemem

From: Dave Hansen <haveblue_at_us.ibm.com>
Date: 2005-06-18 03:39:43
Something David Mosberger said really suck with me:
> This discussion just demonstrates what a pain such config parameters
> are.  Such stuff need to be
> self-adjusting/self-tuning/able-to-cover-any-configuration.  Virtual
> mem-map seems to qualify much better here.

So, how can we make the flat mem_section[] array be more flexible?  Is
it flexible enough now?

The main concern seems to be that anything as large or larger than 32MB
of array is going to be unacceptable.  I'll now contend that anything
that keeps the executable size under the total amount of memory in the
machine is acceptable.

We already have a concept of handing __init data and text back to the
system for use at runtime.  Sparsemem has no dependencies at boot-time
on any other subsystem, and can be run as early as we like, probably
even before the bootmem allocator.  Sparsemem also has the physical
layout of the machine described to it quite early, so it also knows what
parts of the array it needs very early.

Once sparsemem has figured out what it needs, it simply hands the rest
of the array back to the bootmem allocator.  It can do this flexibly,
and only if the mem_section[] array is wasting a certain threshold of
RAM.  This would also allow it to be tweaked from the kernel command
line to skip this action if we ever encounter a system that needs it
skipped.  For instance: a system which starts with virtually no RAM, but
gets hotplugged to a huge size.

For ppc64 (power4/5), the smallest systems that can be configured have
256MB of memory.  That leaves a possible area of 128MB for the
mem_section[] array.  On a 64-bit platform, you can get 2^20 sections in
8MB of memory.  128/8 = 16, so that's 16M sections in 128MB.  At the
smallest section size of 16MB (SECTION_SHIFT==24 on ppc64) that's 48
bits of address space.

Let's look at this in the context of a distro.  RHEL4 *requires* 512MB
of memory on a ia64, or ppc64 system.


That gets you up to 50 bits of address space.  Plus, unlike a fully
static array, these requirements _will_ scale as time goes along.

-- Dave

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Fri Jun 17 13:40:24 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:39 EST