dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/mm
Christoph Lameter 21eac81f25 [PATCH] Swap Migration V5: LRU operations
This is the start of the `swap migration' patch series.

Swap migration allows the moving of the physical location of pages between
nodes in a numa system while the process is running.  This means that the
virtual addresses that the process sees do not change.  However, the system
rearranges the physical location of those pages.

The main intent of page migration patches here is to reduce the latency of
memory access by moving pages near to the processor where the process
accessing that memory is running.

The patchset allows a process to manually relocate the node on which its
pages are located through the MF_MOVE and MF_MOVE_ALL options while
setting a new memory policy.

The pages of process can also be relocated from another process using the
sys_migrate_pages() function call.  Requires CAP_SYS_ADMIN.  The migrate_pages
function call takes two sets of nodes and moves pages of a process that are
located on the from nodes to the destination nodes.

Manual migration is very useful if for example the scheduler has relocated a
process to a processor on a distant node.  A batch scheduler or an
administrator can detect the situation and move the pages of the process
nearer to the new processor.

sys_migrate_pages() could be used on non-numa machines as well, to force all
of a particualr process's pages out to swap, if someone thinks that's useful.

Larger installations usually partition the system using cpusets into sections
of nodes.  Paul has equipped cpusets with the ability to move pages when a
task is moved to another cpuset.  This allows automatic control over locality
of a process.  If a task is moved to a new cpuset then also all its pages are
moved with it so that the performance of the process does not sink
dramatically (as is the case today).

Swap migration works by simply evicting the page.  The pages must be faulted
back in.  The pages are then typically reallocated by the system near the node
where the process is executing.

For swap migration the destination of the move is controlled by the allocation
policy.  Cpusets set the allocation policy before calling sys_migrate_pages()
in order to move the pages as intended.

No allocation policy changes are performed for sys_migrate_pages().  This
means that the pages may not faulted in to the specified nodes if no
allocation policy was set by other means.  The pages will just end up near the
node where the fault occurred.

There's another patch series in the pipeline which implements "direct
migration".

The direct migration patchset extends the migration functionality to avoid
going through swap.  The destination node of the relation is controllable
during the actual moving of pages.  The crutch of using the allocation policy
to relocate is not necessary and the pages are moved directly to the target.
Its also faster since swap is not used.

And sys_migrate_pages() can then move pages directly to the specified node.
Implement functions to isolate pages from the LRU and put them back later.

This patch:

An earlier implementation was provided by Hirokazu Takahashi
<taka@valinux.co.jp> and IWAMOTO Toshihiro <iwamoto@valinux.co.jp> for the
memory hotplug project.

From: Magnus

This breaks out isolate_lru_page() and putpack_lru_page().  Needed for swap
migration.

Signed-off-by: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:12:41 -08:00
..
Kconfig [PATCH] allow flatmem to be disabled when only sparsemem is implemented 2006-01-06 08:33:37 -08:00
Makefile [PATCH] memory hotplug: sysfs and add/remove functions 2005-10-29 21:40:44 -07:00
bootmem.c [PATCH] FRV: Clean up bootmem allocator's page freeing algorithm 2006-01-06 08:33:26 -08:00
fadvise.c
filemap.c [PATCH] find_lock_page(): call __lock_page() directly. 2006-01-06 08:33:26 -08:00
filemap.h
filemap_xip.c [PATCH] mm: rmap with inner ptlock 2005-10-29 21:40:41 -07:00
fremap.c VM: add common helper function to create the page tables 2005-11-29 14:03:14 -08:00
highmem.c [PATCH] gfp_t: the rest 2005-10-28 08:16:51 -07:00
hugetlb.c [PATCH] hugepages: fold find_or_alloc_pages into huge_no_page() 2006-01-06 08:33:23 -08:00
internal.h [PATCH] FRV: Clean up bootmem allocator's page freeing algorithm 2006-01-06 08:33:26 -08:00
madvise.c [PATCH] madvise(MADV_REMOVE): remove pages from tmpfs shm backing store 2006-01-06 08:33:22 -08:00
memory.c [PATCH] mm: pfault optimisation 2006-01-06 08:33:27 -08:00
memory_hotplug.c [PATCH] memhotplug: __add_section remove unused pgdat definition 2006-01-06 08:33:21 -08:00
mempolicy.c [PATCH] mm: move determination of policy_zone into page allocator 2006-01-06 08:33:28 -08:00
mempool.c [PATCH] gfp_t: mm/* (easy parts) 2005-10-28 08:16:47 -07:00
mincore.c
mlock.c
mmap.c Make sure we copy pages inserted with "vm_insert_page()" on fork 2005-12-16 10:21:23 -08:00
mprotect.c [PATCH] unpaged: private write VM_RESERVED 2005-11-22 09:13:42 -08:00
mremap.c Make sure we copy pages inserted with "vm_insert_page()" on fork 2005-12-16 10:21:23 -08:00
msync.c mm: re-architect the VM_UNPAGED logic 2005-11-28 14:34:23 -08:00
nommu.c [PATCH] NOMMU: Make SYSV IPC SHM use ramfs facilities on NOMMU 2006-01-06 08:33:32 -08:00
oom_kill.c
page-writeback.c identify multipage ->writepages() calls 2006-01-06 14:58:38 -05:00
page_alloc.c [PATCH] mm: free_pages opt 2006-01-08 20:12:40 -08:00
page_io.c [PATCH] mm: split page table lock 2005-10-29 21:40:42 -07:00
pdflush.c [PATCH] cpusets: confine pdflush to its cpuset 2005-10-30 17:37:21 -08:00
prio_tree.c
readahead.c [PATCH] add AOP_TRUNCATED_PAGE, prepend AOP_ to WRITEPAGE_ACTIVATE 2006-01-03 11:45:42 -08:00
rmap.c [PATCH] mm: page_state opt 2006-01-06 08:33:29 -08:00
shmem.c [PATCH] NOMMU: Make SYSV IPC SHM use ramfs facilities on NOMMU 2006-01-06 08:33:32 -08:00
slab.c [PATCH] slab: fix code formatting 2006-01-08 20:12:39 -08:00
sparse.c [PATCH] memory hotplug: move section_mem_map alloc to sparse.c 2005-10-29 21:40:44 -07:00
swap.c [PATCH] consolidate lru_add_drain() and lru_drain_cache() 2006-01-06 08:33:28 -08:00
swap_state.c [PATCH] mm: free_pages_and_swap_cache opt 2006-01-06 08:33:24 -08:00
swapfile.c [PATCH] mm: add a new function (needed for swap suspend) 2006-01-06 08:33:43 -08:00
thrash.c [PATCH] temporarily disable swap token on memory pressure 2005-11-28 14:42:25 -08:00
tiny-shmem.c [PATCH] NOMMU: Make SYSV IPC SHM use ramfs facilities on NOMMU 2006-01-06 08:33:32 -08:00
truncate.c [PATCH] drop-pagecache 2006-01-08 20:12:40 -08:00
vmalloc.c [PATCH] kernel-doc: fix warnings in vmalloc.c 2005-11-07 07:53:56 -08:00
vmscan.c [PATCH] Swap Migration V5: LRU operations 2006-01-08 20:12:41 -08:00