From: Dave Hansen <haveblue@us.ibm.com>
To: Ross Biro <rossb@google.com>
Cc: linux-mm@kvack.org, Mel Gorman <MELGOR@ie.ibm.com>
Subject: Re: RFC/POC Make Page Tables Relocatable
Date: Thu, 25 Oct 2007 12:23:02 -0700 [thread overview]
Message-ID: <1193340182.24087.54.camel@localhost> (raw)
In-Reply-To: <d43160c70710251144t172cfd1exef99e0d53fb9be73@mail.gmail.com>
On Thu, 2007-10-25 at 14:44 -0400, Ross Biro wrote:
> On 10/25/07, Dave Hansen <haveblue@us.ibm.com> wrote:
> > > This would almost work, but to do it properly, you find you'll need
> > > some more locks and a couple of extra pointers and such.
> >
> > Could you be specific?
>
> Well to go quickly from an arbitrary page that happens to be part of a
> page table to the appropriate mm to get a lock, I had to store a
> pointer to the mm.
Hold on a sec there. You don't *have* to. :)
With the pagetable page you can go examine ptes. From the ptes, you can
get the 'struct page' for the mapped page. From there, you can get the
anon_vma and at least the list of mms that _could_ map the page. You
get virtual addresses from the linear_page_index() or offset in the
mapping from page->index and vma->vm_pgoff and vm_start. That should
make the search a bit more reasonable.
Slow, yes. But, we're already talking about reclaim paths here.
> Then I also needed to know where the particular
> page fit into the page table tree. Once I had those, it turned out I
> needed a spinlock to protect them to deallocate the page with out
> racing against the relocation. I think I could have used the ptl lock
> struct page, but I wasn't really clear on it when I started.
>
> So I needed 2 pointers which I could have squeezed into struct page
> somewhere, but then what about when I needed a third or forth pointer
> to make something else work well?
I think you started out with the assumption that we needed out of page
metadata and then started adding more reasons that we needed it. I
seriously doubt that you really and truly *NEED* four new fields in
'struct page'. :)
My guys says that this is way too complicated to be pursued in this
form. But, don't listen to me. You don't have to convince _me_.
If you want to pursue this, I'd concentrate on breaking your patch up in
to manageable pieces. Don't forget diffstats at the top of your patch,
too. If I were to start breaking this patch up, I'd probably start with
these things, but probably not in this order. If you do it right,
you'll end up with even more pieces than this.
1. add support to slab for object relocation
2. add support to slab for object metadata
3. allocate pte pages from the slab (yet again)
4. add metadata for pagetable pages (this can be distinct from the other
patches, and a simple implementation might just stick it in 'struct
page' to make it easy to review at first)
5. add and use walk_page_table_*() functions
6. add need_flush tracking to the mm
7. add minimum base page size requirements to the slab
8. add relocation handles
9. your test module
10. rcu for freeing pagetables and tlb flushing
11. actual pagetable relocation code
-- 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>
next prev parent reply other threads:[~2007-10-25 19:23 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
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 [this message]
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=1193340182.24087.54.camel@localhost \
--to=haveblue@us.ibm.com \
--cc=MELGOR@ie.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).