Thread (10 messages) 10 messages, 5 authors, 2004-06-24

Re: Atomic operation for physically moving a page (for memory defragmentation)

From: IWAMOTO Toshihiro <hidden>
Date: 2004-06-23 09:04:04
Also in: lkml

At Fri, 18 Jun 2004 21:25:38 -0700,
Dave Hansen wrote:
I think what you really want to do is keep anybody else from making a
new pte to the page, once you've invalidated all of the existing ones,
right?

Holding a lock_page() should do the trick.  Anybody that goes any pulls
the page out of the page cache has to do a lock_page() and check
page->mapping before they can establish a pte to it, so you can stop
that.  Since you're invalidating page->mapping before you move the page
(you *are* doing this, right?), it will end up working itself out.  
This isn't true unless the PG_uptodate bit of the page isn't cleared,
and properly doing that isn't so simple.

I'm planning to post a new version of my memory hotplug patch,
but the page migration code currently doesn't work well with
linux-2.6.7.

--
IWAMOTO Toshihiro

--
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:"aart@kvack.org"> aart@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help