lkml.org 
[lkml]   [2004]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Atomic operation for physically moving a page (for memory defragmentation)
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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.059 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site