linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: Magnus Damm <magnus@valinux.co.jp>
Cc: linux-mm@kvack.org, Magnus Damm <damm@opensource.se>,
	Andy Whitcroft <apw@shadowen.org>
Subject: Re: [RFC] Removing page->flags
Date: Wed, 08 Feb 2006 11:37:57 -0800	[thread overview]
Message-ID: <1139427478.9452.6.camel@localhost.localdomain> (raw)
In-Reply-To: <1139381183.22509.186.camel@localhost>

On Wed, 2006-02-08 at 15:46 +0900, Magnus Damm wrote: 
> Removing type B bits:
> 
> Instead of using the highest bits of page->flags to locate zones, nodes
> or sparsemem section, let's remove them and locate them using alignment!
> 
> To locate which zone, node and sparsemem section a page belongs to, just
> use struct page (source_page) and aligment! The page that contains the
> specific struct page (and also contains other parts of mem_map), it's
> struct page is located using something like this:
> 
>   memmap_page = virt_to_page(source_page) 

We actually discussed this a number of times when developing sparsemem
and its predecessors.  It does seem silly to store stuff like the node
information in *so* *many* copies all over the place.

Andy's argument at the time (if I remember correctly) was that nobody
was using those particular page flags for anything, so what shouldn't we
use them?  Plus, this gives better cache locality.

You hinted at it, but you are completely right that the 'struct pages'
backing other 'struct pages' aren't used for anything.  They are often
bootmem-allocated, so that probably have PageReserved set, and have
never seen the allocator.  All of their fields are basically free for
any use that we'd like.

The biggest killer for this idea for me is not when the zones or section
edges are not aligned on big powers of 2, but when the 'struct page' is
oddly sized.  When it is 32 or 64 bytes, you get a nice, even number of
them in a full page.  But, when you have a 40-byte 'struct page', things
go downhill in a hurry.  This can be affected by things like spinlock
debugging, so it is hard to predict and handle in advance.

The really basic implementation (without the odd page size handling) is
here, if you care:

http://www.sr71.net/patches/2.6.10/2.6.10-rc2-mm4-mhp3/broken-out/C6-nonlinear-no-page-section.patch

-- Dave

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

  parent reply	other threads:[~2006-02-08 19:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-08  6:46 Magnus Damm
2006-02-08 11:54 ` Nick Piggin
2006-02-09  2:35   ` Magnus Damm
2006-02-09  4:19     ` Nick Piggin
2006-02-09  5:19       ` Magnus Damm
2006-02-09  5:37         ` Nick Piggin
2006-02-11  5:30           ` Marcelo Tosatti
2006-02-10 15:03     ` Rik van Riel
2006-02-08 19:37 ` Dave Hansen [this message]
2006-02-09  2:50   ` Magnus Damm
2006-02-09 17:27     ` Dave Hansen
2006-02-09  1:55 ` KAMEZAWA Hiroyuki
2006-02-09  2:57   ` Magnus Damm
2006-02-09  3:14     ` KAMEZAWA Hiroyuki
2006-02-09  3:38       ` Magnus Damm
2006-02-09  3:51         ` KAMEZAWA Hiroyuki
2006-02-09  5:24           ` Magnus Damm

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=1139427478.9452.6.camel@localhost.localdomain \
    --to=haveblue@us.ibm.com \
    --cc=apw@shadowen.org \
    --cc=damm@opensource.se \
    --cc=linux-mm@kvack.org \
    --cc=magnus@valinux.co.jp \
    /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