From: Christoph Lameter <clameter@sgi.com>
To: akpm@osdl.org
Cc: Mike Kravetz <kravetz@us.ibm.com>,
Ray Bryant <raybry@mpdtxmail.amd.com>,
linux-kernel@vger.kernel.org,
Lee Schermerhorn <lee.schermerhorn@hp.com>,
Dave Hansen <haveblue@us.ibm.com>,
linux-mm@kvack.org, Christoph Lameter <clameter@sgi.com>,
Magnus Damm <magnus.damm@gmail.com>, Paul Jackson <pj@sgi.com>,
Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: [PATCH 0/5] Swap Migration V4: Overview
Date: Tue, 25 Oct 2005 12:30:23 -0700 (PDT) [thread overview]
Message-ID: <20051025193023.6828.89649.sendpatchset@schroedinger.engr.sgi.com> (raw)
This is a patchset intended to introduce page migration into the kernel
through a simple implementation of swap based page migration.
The aim is to be minimally intrusive in order to have some hopes for inclusion
into 2.6.15. A separate direct page migration patch is being developed that
applies on top of this patch. The direct migration patch is being discussed on
<lhms-devel@lists.sourceforge.net>.
Much of the code is based on code that the memory hotplug project and Ray Bryant
have been working on for a long time. See http://sourceforge.net/projects/lhms/
Changes from V3 to V4:
- patch against 2.6.14-rc5-mm1.
- Correctly gather pages in migrate_add_page()
- Restructure swapout code for easy later application of the direct migration
patches. Rename swapout() to migrate_pages().
- Add PF_SWAPWRITE support to allow write to swap from a process. Save
and restore earlier state to allow nesting of the use of PF_SWAPWRITE.
- Fix sys_migrate_pages permission check (thanks Ray).
Changes from V2 to V3:
- Break out common code for page eviction (Thanks to a patch by Magnus Damm)
- Add check to avoid MPOL_MF_MOVE moving pages that are also accessed from
another address space. Add support for MPOL_MF_MOVE_ALL to override this
(requires superuser priviledges).
- Update overview regarding direct page migration patchset following soon and
cut longwinded explanations.
- Add sys_migrate patchset
- Check cpuset restrictions on sys_migrate.
Changes from V1 to V2:
- Patch against 2.6.14-rc4-mm1
- Remove move_pages() function
- Code cleanup to make it less invasive.
- Fix missing lru_add_drain() invocation from isolate_lru_page()
In a NUMA system it is often beneficial to be able to move the memory
in use by a process to different nodes in order to enhance performance.
Currently Linux simply does not support this facility. This patchset
implements page migration via a new syscall sys_migrate_pages and via
the memory policy layer with the MPOL_MF_MOVE and MPOL_MF_MOVE_ALL
flags.
Page migration is also useful for other purposes:
1. Memory hotplug. Migrating processes off a memory node that is going
to be disconnected.
2. Remapping of bad pages. These could be detected through soft ECC errors
and other mechanisms.
migrate_pages() can only migrate pages under certain conditions. These other
uses may require additional measures to ensure that pages are migratable. The
hotplug project f.e. restricts allocations to removable memory.
The patchset consists of five patches:
1. LRU operations
Add basic operations to remove pages from the LRU lists and return
them back to it.
2. PF_WRITESWAP
Allow a process to set PF_WRITESWAP in its flags in order to be allowed
to write pages to swap space.
3. migrate_pages() implementation
Adds a function to mm/vmscan.c called migrate_pages(). The functionality
of that function is restricted to swapping out pages. An additional patch
is necessary for direct page migration.
4. MPOL_MF_MOVE flag for memory policies.
This implements MPOL_MF_MOVE in addition to MPOL_MF_STRICT. MPOL_MF_STRICT
allows the checking if all pages in a memory area obey the memory policies.
MPOL_MF_MOVE will migrate all pages that do not conform to the memory policy.
If pages are evicted then the system will allocate pages conforming to the
policy on swap in.
5. sys_migrate_pages system call and cpuset API
Adds a new function call
sys_migrate_pages(pid, maxnode, from_nodes, to_nodes)
to migrate pages of a process to a different node and also a function
for the use of the migration mechanism in cpusets
do_migrate_pages(struct mm_struct *, from_nodes, to_nodes, move_flags).
=====
URLs referring to the discussion regarding the initial version of these
patches.
Page eviction: http://marc.theaimsgroup.com/?l=linux-mm&m=112922756730989&w=2
Numa policy : http://marc.theaimsgroup.com/?l=linux-mm&m=112922756724715&w=2
Discussion of V2 of the patchset:
http://marc.theaimsgroup.com/?t=112959680300007&r=1&w=2
Discussion of V3:
http://marc.theaimsgroup.com/?t=112984939600003&r=1&w=2
--
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>
next reply other threads:[~2005-10-25 19:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-25 19:30 Christoph Lameter [this message]
2005-10-25 19:30 ` [PATCH 1/5] Swap Migration V4: LRU operations Christoph Lameter
2005-10-26 9:31 ` Peter Zijlstra
2005-10-26 16:44 ` Christoph Lameter
2005-10-25 19:30 ` [PATCH 2/5] Swap Migration V4: PF_SWAPWRITE to allow writing to swap Christoph Lameter
2005-10-25 19:30 ` [PATCH 3/5] Swap Migration V4: migrate_pages() function Christoph Lameter
2005-10-26 7:15 ` Dave Hansen
2005-10-26 16:48 ` Christoph Lameter
2005-10-25 19:30 ` [PATCH 4/5] Swap Migration V4: MPOL_MF_MOVE interface Christoph Lameter
2005-10-25 19:30 ` [PATCH 5/5] Swap Migration V4: sys_migrate_pages interface Christoph Lameter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051025193023.6828.89649.sendpatchset@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=akpm@osdl.org \
--cc=haveblue@us.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kravetz@us.ibm.com \
--cc=lee.schermerhorn@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=magnus.damm@gmail.com \
--cc=marcelo.tosatti@cyclades.com \
--cc=pj@sgi.com \
--cc=raybry@mpdtxmail.amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox