linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Andy Whitcroft <apw@shadowen.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-arch@vger.kernel.org,
	Nick Piggin <npiggin@suse.de>, Mel Gorman <mel@csn.ul.ie>
Subject: Re: [PATCH 3/4] vmemmap: pull out the vmemmap code into its own file
Date: Thu, 2 Aug 2007 12:28:06 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0708021220220.7948@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20070802132621.GA9511@infradead.org>

On Thu, 2 Aug 2007, Christoph Hellwig wrote:

> On Thu, Aug 02, 2007 at 10:25:35AM +0100, Andy Whitcroft wrote:
> > + * Special Kconfig settings:
> > + *
> > + * CONFIG_ARCH_POPULATES_SPARSEMEM_VMEMMAP
> > + *
> > + * 	The architecture has its own functions to populate the memory
> > + * 	map and provides a vmemmap_populate function.
> > + *
> > + * CONFIG_ARCH_POPULATES_SPARSEMEM_VMEMMAP_PMD

?? Why was this added? The arch can populate the PMDs on its own already 
if CONFIG_ARCH_SPARSEMEM_VMEMMAP is set.

> This is the kinda of mess I mean.  Which architecturs set either of these
> and why?  This code would be a lot more acceptable if we hadn't three
> different variants of the arch interface.

Initially at least my scheme was the following:

In general the sparsemem code can take care of a vmemmap that is using a 
section of the vmalloc space. In that case no arch code is needed to 
populate the vmemmap. Typical use is by arches with large pages (like 
IA64). This is the default if no other options are set and can simply be 
enabled by defining some constants in the arch code to reserve a section 
of the vmalloc space.

Then there is the option of using the PMD to map a higher order page. This 
can also be done transparently and is used by arches that have this 
capability and a small page size. Those arches also require no additional 
code to populate their vmemmap. This is true f.e. for i386 and x86_64. 
These have to set CONFIG_ARCH_SUPPORTS_PMD_MAPPING

Then there are arches that have the vmemmap in non standard ways. Memory 
may not be taken from the vmalloc space, special flags may have to be set 
for the page tables (or one may use a different mechanism for mapping). 
Those arches have to set CONFIG_ARCH_POPULATES_VIRTUAL_MEMMAP. In that 
case the arch must provide its own function to populate the memory map.

--
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>

  reply	other threads:[~2007-08-02 19:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-02  9:24 [PATCH 0/4] vmemmap updates to V6 Andy Whitcroft
2007-08-02  9:24 ` [PATCH 1/4] vmemmap: remove excess debugging Andy Whitcroft
2007-08-02 19:18   ` Christoph Lameter
2007-08-02  9:25 ` [PATCH 2/4] vmemmap: simplify initialisation code and reduce duplication Andy Whitcroft
2007-08-02  9:25 ` [PATCH 3/4] vmemmap: pull out the vmemmap code into its own file Andy Whitcroft
2007-08-02 13:26   ` Christoph Hellwig
2007-08-02 19:28     ` Christoph Lameter [this message]
2007-08-03 14:57       ` Andy Whitcroft
2007-08-03 16:58         ` Christoph Lameter
2007-08-02  9:25 ` [PATCH 4/4] vmemmap ppc64: convert VMM_* macros to a real function Andy Whitcroft
2007-08-02 16:31   ` Dave Hansen
2007-08-02 17:39     ` Andy Whitcroft
2007-08-02 18:00       ` Dave Hansen
2007-08-02 19:30     ` Christoph Lameter

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=Pine.LNX.4.64.0708021220220.7948@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@shadowen.org \
    --cc=hch@infradead.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=npiggin@suse.de \
    /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