linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: Ross Biro <rossb@google.com>
Cc: linux-mm@kvack.org
Subject: Re: RFC/POC Make Page Tables Relocatable
Date: Thu, 25 Oct 2007 09:46:14 -0700	[thread overview]
Message-ID: <1193330774.4039.136.camel@localhost> (raw)
In-Reply-To: <d43160c70710250816l44044f31y6dd20766d1f2840b@mail.gmail.com>

On Thu, 2007-10-25 at 11:16 -0400, Ross Biro wrote:
> 1) Add a separate meta-data allocation to the slab and slub allocator
> and allocate full pages through kmem_cache_alloc instead of get_page.
> The primary motivation of this is that we could shrink struct page by
> using kmem_cache_alloc to allocate whole pages and put the supported
> data in the meta_data area instead of struct page. 

The idea seems cool, but I think I'm missing a lot of your motivation
here.

First of all, which meta-data, exactly, is causing 'struct page' to be
larger than it could be?  Which meta-data can be moved?

> 2) Add support for relocating memory allocated via kmem_cache_alloc.
> When a cache is created, optional relocation information can be
> provided.  If a relocation function is provided, caches can be
> defragmented and overall memory consumption can be reduced.

We may truly need this some day, but I'm not sure we need it for
pagetables.  If I were a stupid, naive kernel developer and I wanted to
get a pte page back, I might simply hold the page table lock, walk the
pagetables to the pmd, lock and invalidate the pmd, copy the pagetable
contents into a new page, update the pmd, and be on my merry way.  Why
doesn't this work?  I'm just fishing for a good explanation why we need
all the slab silliness.

I applaud you for posting early and posting often, but there is an
absolute ton of code in your patch.  For your subsequent postings, I'd
highly recommend trying to break it up in some logical ways.  Your 4
steps would be an excellent start.

You might also want to run checkpatch.pl on your patch.  It has some
style issues that also need to get worked out.

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

  reply	other threads:[~2007-10-25 16:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25 15:16 RFC/POC Make Page Tables Relocatable Ross Biro
2007-10-25 16:46 ` Dave Hansen [this message]
2007-10-25 17:40   ` Ross Biro
2007-10-25 18:08     ` Dave Hansen
2007-10-25 18:44       ` Ross Biro
2007-10-25 18:47         ` Dave Hansen
2007-10-25 19:23         ` Dave Hansen
2007-10-25 19:53           ` Ross Biro
2007-10-25 19:56             ` Dave Hansen
2007-10-25 19:58             ` Ross Biro
2007-10-25 20:15               ` Dave Hansen
2007-10-25 20:00             ` Dave Hansen
2007-10-25 20:10               ` Ross Biro
2007-10-25 20:20                 ` Dave Hansen
2007-10-26 16:10       ` Mel Gorman
2007-10-26 16:51         ` Ross Biro
2007-10-26 17:11           ` Mel Gorman

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=1193330774.4039.136.camel@localhost \
    --to=haveblue@us.ibm.com \
    --cc=linux-mm@kvack.org \
    --cc=rossb@google.com \
    /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;
as well as URLs for NNTP newsgroup(s).