From: Dave Hansen <haveblue@us.ibm.com>
To: Ross Biro <rossb@google.com>
Cc: Mel Gorman <mel@skynet.ie>,
linux-mm@kvack.org, Mel Gorman <MELGOR@ie.ibm.com>
Subject: Re: RFC/POC Make Page Tables Relocatable Part 2 Page Table Migration Code
Date: Fri, 30 Nov 2007 10:04:17 -0800 [thread overview]
Message-ID: <1196445857.18851.140.camel@localhost> (raw)
In-Reply-To: <d43160c70711300836g52c10a88qc46288cf380192ca@mail.gmail.com>
On Fri, 2007-11-30 at 11:36 -0500, Ross Biro wrote:
> lmbench shows the overhead of rewalking the page tables is less than
> that of spinlock debugging.
Spinlock debugging can be pretty heavy, so I wouldn't use it as a
benchmark. Thanks for posting them early, though.
> Here's the actual page table migration code. I'm not sure I plugged
> it into the correct spot, but it works well enough to test.
Could you remind us exactly what you're trying to do here? A bit of the
theory of what you're trying would be good. Also, this is a wee bit
hard to review because it's a bit messy, still has lots of debugging
printks, and needs some CodingStyle love. Don't forget to add -p do
your diffs while you're at it.
Where did PageDying() come from? Where ever it came from, please wrap
it up in its header in a nice #ifdef so you don't have to do this a
number of times:
...
> +{
> +#ifdef CONFIG_SLOW_CACHE
> + while (unlikely(PageDying(pmd_page(**pmd))))
> +#endif
> + {
...
> + union {
> struct list_head lru; /* Pageout list, eg. active_list
> * protected by zone->lru_lock !
> */
> + struct rcu_head rcu;
> + };
There's a nice shiny comment next to 'lru'. Hint, hint. ;)
> +int migrate_top_level_page_table(struct mm_struct *mm, struct page *dest)
> +{
> + return 1;
> +#if 0
> + unsigned long flags;
> + void *dest_ptr;
> +
> + /* We can't do this until we get a heavy duty tlb flush, or
> + we can force this mm to be switched on all cpus. */
Can you elaborate on this? You need each cpu to do a task switch _away_
from this mm?
> +int migrate_pmd(pmd_t *pmd, struct mm_struct *mm, unsigned long addr,
> + struct page *dest)
> +{
...
> + pte = pte_offset_map(pmd, addr);
> +
> + dest_ptr = kmap_atomic(dest, KM_IRQ0);
Why KM_IRQ0 here?
-- 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-11-30 17:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-30 16:36 RFC/POC Make Page Tables Relocatable Part 2 Page Table Migration Code Ross Biro
2007-11-30 18:04 ` Dave Hansen [this message]
2007-11-30 18:32 ` Ross Biro
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=1196445857.18851.140.camel@localhost \
--to=haveblue@us.ibm.com \
--cc=MELGOR@ie.ibm.com \
--cc=linux-mm@kvack.org \
--cc=mel@skynet.ie \
--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).