Attached is a git patch that implements a feature that is used by Stratus
fault-tolerant servers running on Intel x86_64 platforms. It provides the
kernel mechanism that allows a loadable module to be able to keep track of
recently dirtied pages for the purpose of copying live, currently active
memory, to a spare memory module.
In Stratus servers, this spare memory module (and CPUs) will be brought into
lockstep with the original memory (and CPUs) in order to achieve fault
tolerance.
In order to make this feature work, it is necessary to track pages which have
been recently dirtied. A simplified view of the algorithm used in the kernel
module is this:
1. Turn on the tracking functionality.
2. Copy all memory from active to spare memory module.
3. Until done:
a) Identify all pages that were dirtied in the active memory since
the last copy operation.
b) Copy all pages identified in 3a to the spare memory module.
c) If number of pages still dirty is less than some threshhold,
i. "black out" the system (enter SMI)
ii. copy remaining pages in blackout context
iii. goto step 4
Else
goto 3a.
4. synchronize cpus
5. leave SMI, return to OS
6. System is now "Duplexed", and fault tolerant.
Please consider this feature for inclusion in the kernel tree, as it is very
important to Stratus.