From: Andy Whitcroft <apw@shadowen.org>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux-mm@kvack.org
Subject: Re: sparsemem & sparsemem extreme question
Date: Tue, 04 Oct 2005 15:33:55 +0100 [thread overview]
Message-ID: <434292D3.2040105@shadowen.org> (raw)
In-Reply-To: <20051004065030.GA21741@osiris.boeblingen.de.ibm.com>
Heiko Carstens wrote:
> I did an implementation of CONFIG_SPARSEMEM for s390, which indeed was quite
> easy. Just to find out that it was not sufficient :)
> SPARSEMEM_EXTREME looks better but unfortunately adds another layer of
> indirection.
> I'm just wondering why there is all this indirection stuff here and why not
> have one contiguous aray of struct pages (residing in the vmalloc area) that
> deals with whatever size of memory an architecture wants to support.
> Unused areas just wouldn't have any backing with real pages and on access
> generate a page fault (nobody is supposed to access these pages anyway).
> This would have the advantage that all the primitives like e.g. pfn_to_page
> would be as simple as before, no need to waste large parts of the page flags
> and in addition it would easily allow for memory hotplug on page size
> granularity.
> The only drawbacks are (as far as I can see) a _huge_ virtual mem_map array,
> but that shouldn't matter too much. A real problem could be that the mem_map
> array and therefore the vmalloc area need to be generated quiete early.
>
> Most probably this has already been thought about before, but I couldn't find
> anything in the achives.
During the implementation of SPARSEMEM_EXTREME other layouts such as the
huge 'partially populated' mem_map were considered. For a number of our
target architectures kernel virtual address is at a premium so this
would not be suitable for them. We did consider whether to have
different mechanisms for KVA rich architectures but (if I remember
correctly) benchmarking the implementation seemed to indicate that the
additional indirection was insignificant if even detectable.
The architecture of sparsemem is supposed to allow architecture specific
implementations should that be necessary but I've not yet seen a
compelling arguement for one yet.
On the subject of page flags, I would point out that SPARSEMEM either
reuses already used bits for 32 bit architectures, or makes use of
unused bits in the 64 case. It doesn't reduce the number of flags bits
available.
-apw
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2005-10-04 14:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-04 6:50 Heiko Carstens
2005-10-04 14:33 ` Andy Whitcroft [this message]
2005-10-04 16:15 ` Dave Hansen
2005-10-05 6:39 ` Heiko Carstens
2005-10-05 15:52 ` Dave Hansen
2005-10-05 15:58 ` Heiko Carstens
2005-10-05 16:05 ` Dave Hansen
2005-10-05 16:10 ` Heiko Carstens
2005-10-05 16:20 ` Dave Hansen
2005-10-05 17:12 ` Heiko Carstens
2005-10-05 17:20 ` Dave Hansen
2005-10-05 17:45 ` Heiko Carstens
2005-10-05 17:57 ` Dave Hansen
2005-10-05 18:04 ` Heiko Carstens
2005-10-05 18:42 ` Bob Picco
2005-10-05 22:06 ` Dave Hansen
2005-10-06 7:39 ` Heiko Carstens
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=434292D3.2040105@shadowen.org \
--to=apw@shadowen.org \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-mm@kvack.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