linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Dirty page tracking & on-the-fly memory mirroring
@ 2009-08-01  0:44 Jim Paradis
  2009-08-01  5:13 ` Chris Friesen
  0 siblings, 1 reply; 2+ messages in thread
From: Jim Paradis @ 2009-08-01  0:44 UTC (permalink / raw)
  To: linux-mm; +Cc: linux-kernel

Following are two patches against 2.6.31-rc3 which implement dirty page 
tracking and on-the-fly memory mirroring.  The idea is to be able to 
copy the entire physical memory over to another processor node or memory 
module while the system is running.  Stratus makes use of this 
functionality to bring a new partner node online.  Supercomputer 
applications can use this to allow a failing module to gracefully bring 
up and cut over to a hot spare.

The overall method is as follows: An initial scan is made to copy over 
all of physical memory.  During that time, some pages may have been 
dirtied so we have to go back and copy them again.  Lather, rinse, 
repeat for a set number of passes.  Finally, quiesce the system so that 
we can copy over the last of the dirtied pages.  Note that we only want 
to copy over pages that have been RE-dirtied since our last scan.  If a 
page was dirty in the first scan but no *additional* data has been 
written to it, there's no need to copy it over again.

The first patch implements dirty page tracking and re-dirty detection.  
We use one of the programmer bits in the PTE to implement a "soft dirty" 
bit.  In the VM subsystem, all tests for dirty pages check the logical 
OR of the hardware dirty bit and the "soft dirty" bit; if either one is 
set the page is considered "dirty" for VM purposes.  To speed up the 
scanning passes this patch also implements a bitmapped side-list of 
dirty physical pages.

The second patch is a reference implementation of a memory-mirroring 
module ("pagesync").  It is the same code that Stratus uses minus some 
hardware-specific bits.  This module scans through physical memory, 
clearing the hardware dirty bit of any dirty page and setting the 
software dirty bit.  If a dirty page has the *hardware* dirty bit set on 
a subsequent scan, we know that the page has been re-dirtied and it is a 
candidate for being copied again.

Jim Paradis
Red Hat Stratus onsite partner rep

--
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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 0/2] Dirty page tracking & on-the-fly memory mirroring
  2009-08-01  0:44 [PATCH 0/2] Dirty page tracking & on-the-fly memory mirroring Jim Paradis
@ 2009-08-01  5:13 ` Chris Friesen
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Friesen @ 2009-08-01  5:13 UTC (permalink / raw)
  To: Jim Paradis; +Cc: linux-mm, linux-kernel

Jim Paradis wrote:
> Following are two patches against 2.6.31-rc3 which implement dirty page 
> tracking and on-the-fly memory mirroring.  The idea is to be able to 
> copy the entire physical memory over to another processor node or memory 
> module while the system is running.  Stratus makes use of this 
> functionality to bring a new partner node online.

We've been using something like this to mirror specific applications.
Our API is a bit different, it's per-process and lets the app specify
memory regions to monitor.  Another task sharing the memory map can
query the system for the addresses of pages that have been dirtied since
it last asked.

Chris

--
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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-01  5:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-01  0:44 [PATCH 0/2] Dirty page tracking & on-the-fly memory mirroring Jim Paradis
2009-08-01  5:13 ` Chris Friesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox