linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: balbir@linux.vnet.ibm.com
Cc: linux-mm@kvack.org, nickpiggin@yahoo.com.au, clameter@sgi.com,
	Lee.Schermerhorn@hp.com, akpm@linux-foundation.org,
	mbligh@google.com
Subject: Re: [RFC][PATCH] overwride page->mapping [0/3] intro
Date: Wed, 12 Sep 2007 22:28:09 +0900	[thread overview]
Message-ID: <20070912222809.3c972cb3.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <46E7A666.7080409@linux.vnet.ibm.com>

On Wed, 12 Sep 2007 14:12:14 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:

> KAMEZAWA Hiroyuki wrote:
> > In general, we cannot inclease size of 'struct page'. So, overriding and
> > adding prural meanings to page struct's member is done in many situation.
> > 
> 
> Hi, Kamezawa,
> 
> We discussed the struct page size issue at VM summit. If I remember
> correctly, Linus suggested that we consider using pfn's instead of
> pointers for pointer members in struct page.
> 
Hmm, define something like this ?
==
#define page_cointainer_for_pfn(pfn)      some_routine
==

> > But to do some kind of precise VM mamangement, page struct itself seems to be
> > too small. This patchset overrides page->mapping and add on-demand page
> > information.
> > 
> > like this:
> > 
> > ==
> > page->mapping points to address_space or anon_vma or mapping_info
> > 
> 
> Could you elaborate a little here, on what is the basis to decide
> what page->mapping should point to?

- page->mapping & 0x3 == 0   -> address_space
- page->mapping & 0x3 == 0x2 -> mapping_info (points to address_space)
- page->mapping & 0x3 == 0x1 -> anon_vma
- page->mapping & 0x3 == 0x3 -> mapping_info (points to anon_vma)



> 
> > mapping_info is strucutured as 
> > 
> > struct mapping_info {
> > 	union {
> > 		anon_vma;
> > 		address_space;
> > 	};
> > 	/* Additional Information to this page */
> > };
> > 
> > ==
> > This works based on "adding page->mapping interface" patch set, I posted.
> > 
> > My main target is move page_container information to this mapping_info.
> > By this, we can avoid increasing size of struct page when container is used.
> > 
> 
> I am not against this goal, but wouldn't we end up with too many
> dereferences to get to the container?
> i.e, page->mapping->page_container->mem_container.
> 
I'm now thinling like this.
==
>From : page->container -> mem_contnainer.
To   : page->mapping_info.container -> mem_container
==                     ^^^^^


Thanks,
-Kame

--
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-09-12 13:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-12  2:43 KAMEZAWA Hiroyuki
2007-09-12  2:45 ` [RFC][PATCH] overwride page->mapping [1/3] cleanup KAMEZAWA Hiroyuki
2007-09-12  2:47 ` [RFC][PATCH] overwride page->mapping [2/3] page_mapping_info KAMEZAWA Hiroyuki
2007-09-12  2:48 ` [RFC][PATCH] override page->mapping [3/3] mlock counter per page KAMEZAWA Hiroyuki
2007-09-12  8:42 ` [RFC][PATCH] overwride page->mapping [0/3] intro Balbir Singh
2007-09-12 13:28   ` KAMEZAWA Hiroyuki [this message]
2007-09-12 19:10   ` Christoph Lameter
2007-09-12 19:12     ` Martin Bligh
2007-09-12 19:17       ` Christoph Lameter
2007-09-13  0:32       ` KAMEZAWA Hiroyuki
2007-09-13  1:05         ` Christoph Lameter
2007-09-13  1:27           ` KAMEZAWA Hiroyuki

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=20070912222809.3c972cb3.kamezawa.hiroyu@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=Lee.Schermerhorn@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=clameter@sgi.com \
    --cc=linux-mm@kvack.org \
    --cc=mbligh@google.com \
    --cc=nickpiggin@yahoo.com.au \
    /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