Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrea Arcangeli
Date: Tuesday, November 11, 2008 - 2:35 pm

On Tue, Nov 11, 2008 at 03:21:45PM -0600, Christoph Lameter wrote:

Just to make an example, remove_migration_pte adds the page back to
rmap layer. We can't do that right now as rmap for the ksm pages will
be built inside ksm, or alternatively rmap.c will have to learn to
handle nonlinear anon-vma.

Migration simply migrates the page. The new page is identical to the
original one, just backed by different physical memory.

For us the new page is an entirely different beast that we build
ourself (we can't let migrate.c to pretend dealing with the newpage
like if it resembled the old page like it's doing now).

We replace a linear anon page with something that isn't an anonymous
page at all right now (in the future it may become a nonlinear anon
page if VM learns about it, or still an unknown page
external-rmappable if we go the external-rmap way).

There's clearly something to share, but the replace_page seem to be
the one that could be called from migrate.c. What is different is that
we don't need the migration pte placeholder, we never block releasing
locks, all atomic with pte wrprotected, and a final pte_same check
under PT lock before we replace the page. There isn't a whole lot to
share after all, but surely it'd be nice to share if we can. Us
calling into migrate.c isn't feasible right now without some
significant change to migrate.c where it would be misplaced IMHO as to
share we'd need migrate.c to call into VM core instead.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/4] rmap: add page_wrprotect() function,, Izik Eidus, (Tue Nov 11, 6:21 am)
[PATCH 3/4] add ksm kernel shared memory driver, Izik Eidus, (Tue Nov 11, 6:21 am)
[PATCH 4/4] MMU_NOTIFIRES: add set_pte_at_notify(), Izik Eidus, (Tue Nov 11, 6:21 am)
Re: [PATCH 1/4] rmap: add page_wrprotect() function,, Andrew Morton, (Tue Nov 11, 12:39 pm)
Re: [PATCH 0/4] ksm - dynamic page sharing driver for linux, Andrea Arcangeli, (Tue Nov 11, 12:55 pm)
Re: [PATCH 1/4] rmap: add page_wrprotect() function,, Andrea Arcangeli, (Tue Nov 11, 1:38 pm)
Re: [PATCH 3/4] add ksm kernel shared memory driver, Andrew Morton, (Tue Nov 11, 1:38 pm)
Re: [PATCH 1/4] rmap: add page_wrprotect() function,, Andrew Morton, (Tue Nov 11, 2:01 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Andrea Arcangeli, (Tue Nov 11, 2:06 pm)
Re: [PATCH 1/4] rmap: add page_wrprotect() function,, Andrea Arcangeli, (Tue Nov 11, 2:17 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Christoph Lameter, (Tue Nov 11, 2:21 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Christoph Lameter, (Tue Nov 11, 2:26 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Christoph Lameter, (Tue Nov 11, 2:31 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Andrea Arcangeli, (Tue Nov 11, 2:35 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Christoph Lameter, (Tue Nov 11, 2:47 pm)
Re: [PATCH 3/4] add ksm kernel shared memory driver, Andrea Arcangeli, (Tue Nov 11, 3:03 pm)
Re: [PATCH 3/4] add ksm kernel shared memory driver, Jonathan Corbet, (Tue Nov 11, 3:03 pm)
Re: [PATCH 3/4] add ksm kernel shared memory driver, Izik Eidus, (Tue Nov 11, 3:17 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Andrea Arcangeli, (Tue Nov 11, 3:17 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Andrea Arcangeli, (Tue Nov 11, 3:24 pm)
Re: [PATCH 3/4] add ksm kernel shared memory driver, Jonathan Corbet, (Tue Nov 11, 3:25 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Christoph Lameter, (Tue Nov 11, 3:30 pm)
Re: [PATCH 3/4] add ksm kernel shared memory driver, Jonathan Corbet, (Tue Nov 11, 3:30 pm)
Re: [PATCH 3/4] add ksm kernel shared memory driver, Izik Eidus, (Tue Nov 11, 3:31 pm)
Re: [PATCH 3/4] add ksm kernel shared memory driver, Izik Eidus, (Tue Nov 11, 3:38 pm)
Re: [PATCH 3/4] add ksm kernel shared memory driver, Valdis.Kletnieks, (Tue Nov 11, 3:40 pm)
Re: [PATCH 3/4] add ksm kernel shared memory driver, Avi Kivity, (Tue Nov 11, 3:43 pm)
Re: [PATCH 3/4] add ksm kernel shared memory driver, Avi Kivity, (Tue Nov 11, 3:49 pm)
Re: [PATCH 3/4] add ksm kernel shared memory driver, Izik Eidus, (Tue Nov 11, 4:02 pm)
Re: [PATCH 3/4] add ksm kernel shared memory driver, Andrea Arcangeli, (Tue Nov 11, 4:03 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Andrea Arcangeli, (Tue Nov 11, 4:17 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Andrea Arcangeli, (Tue Nov 11, 4:25 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Christoph Lameter, (Tue Nov 11, 5:27 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., KAMEZAWA Hiroyuki, (Tue Nov 11, 7:19 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Andrea Arcangeli, (Tue Nov 11, 7:27 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Christoph Lameter, (Tue Nov 11, 8:10 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Andrea Arcangeli, (Wed Nov 12, 10:32 am)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Lee Schermerhorn, (Wed Nov 12, 1:08 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Christoph Lameter, (Wed Nov 12, 1:27 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Christoph Lameter, (Wed Nov 12, 1:31 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Lee Schermerhorn, (Wed Nov 12, 3:09 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Andrea Arcangeli, (Wed Nov 12, 7:00 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., Andrea Arcangeli, (Wed Nov 12, 7:31 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., KAMEZAWA Hiroyuki, (Wed Nov 12, 11:11 pm)
Re: [PATCH 3/4] add ksm kernel shared memory driver, Eric Rannaud, (Wed Nov 12, 11:13 pm)
Re: [PATCH 2/4] Add replace_page(), change the mapping of ..., KAMEZAWA Hiroyuki, (Thu Nov 13, 4:32 am)