Skip to content

VM pageout scalability improvements (V7)

Rik van Riel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 4 repliesIn review

Changelog from the cover letter · 37 lines

- improve swap space freeing to deal with COW shared space
(Lee Schermerhorn, Daisuke Nishimura & Minchan Kim)
- clean up PG_swapbacked setting in swapin path (Minchan Kim)
- properly invoke shrink_active_list for background aging (Minchan Kim)
- add authorship info to all patches (Rik van Riel)
- clean up (or move below ---) the comments for the commit logs (Rik van Riel)
- after some tests, reduce default swappiness to 20 for now (Rik van Riel)

- several code cleanups (minchan Kim)
- noreclaim patch refactoring and improvements (Lee Schermerhorn)
- several PROT_NONE and vma merging fixes (KOSAKI Motohiro)
- SMP bugfixes and efficiency improvements (Rik van Riel, Lee Schermerhorn)
- fix NUMA node stats printing (Lee Schermerhorn)
- remove the mlocked-VMA-noreclaim code for now, it still has bugs on IA64 and is holding up the merge (Rik van Riel)

- make page_alloc.c compile without CONFIG_NORECLAIM_MLOCK (minchan Kim)
- BUG() does not take an argument (minchan Kim)
- clean up is_active_lru and is_file_lru (Andy Whitcroft)
- clean up shrink_active_list temp list names (KOSAKI Motohiro)
- add total active & inactive memory totals for vmstat -a (KOSAKI Motohiro)
- only try global anon page aging on global lru scans (KOSAKI Motohiro)
- make function descriptions follow the kernel-doc format (Rik van Riel)
- simplify mlock_vma_pages_range and munlock_vma_pages_range (Lee Schermerhorn)
- remove some more arguments, rename to mlock_vma_pages_all (Lee Schermerhorn)
- many code cleanups (Lee Schermerhorn)
- pass correct vma arg to mlock_vma_pages_range from do_brk (Rik van Riel)
- port to 2.6.25-rc3-mm1

- pull the memcontrol lru arrayification earlier into the patch series
- use a pagevec array similar to the lru array
- clean up the code in various places
- improved pageout balancing and reduced pageout cpu use

- fix compilation on PPC and without memcontrol
- make page_is_pagecache more readable
- replace get_scan_ratio with correct version

- merge memcontroller split LRU code into the main split LRU patch, since it is not functionally different (it was split up only to help people who had seen the last version of the patch series review it)
- drop the page_file_cache debugging patch, since it never triggered
- reintroduce code to not scan anon list if swap is full
- add code to scan anon list if page cache is very small already
- use lumpy reclaim more aggressively for smaller order > 1 allocations

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14move isolate_lru_page() to vmscan.cinclude/linux/migrate.h mm/internal.h mm/mempolicy.c +2 more+57 -360 replies
2/14Use an indexed array for LRU variablesinclude/linux/memcontrol.h include/linux/mm_inline.h include/linux/mmzone.h +5 more+146 -1700 replies
3/14use an array for the LRU pagevecsinclude/linux/mmzone.h include/linux/pagevec.h include/linux/swap.h +2 more+83 -680 replies
4/14free swap space on swap-in/activationinclude/linux/pagevec.h include/linux/swap.h mm/swap.c +2 more+49 -32 replies
5/14define page_file_cache() functioninclude/linux/mm_inline.h include/linux/page-flags.h mm/memory.c +4 more+39 -00 replies
6/14split LRU lists into anon & file setsdrivers/base/node.c fs/cifs/file.c fs/nfs/dir.c +19 more+491 -3870 replies
7/14second chance replacement for anonymous pagesinclude/linux/mm_inline.h include/linux/mmzone.h mm/page_alloc.c +2 more+92 -90 replies
8/14add some sanity checks to get_scan_ratioinclude/linux/mmzone.h mm/page_alloc.c mm/swap.c +1 more+85 -370 replies
9/14add newly swapped in pages to the inactive listmm/swap_state.c+1 -10 replies
10/14more aggressively use lumpy reclaimmm/vmscan.c+16 -40 replies
11/14No Reclaim LRU Infrastructureinclude/linux/mm_inline.h include/linux/mmzone.h include/linux/page-flags.h +8 more+240 -320 replies
12/14Non-reclaimable page statisticsdrivers/base/node.c fs/proc/proc_misc.c mm/page_alloc.c +1 more+30 -10 replies
13/14ramfs pages are non-reclaimabledrivers/block/brd.c fs/ramfs/inode.c include/linux/pagemap.h +1 more+41 -00 replies
14/14SHM_LOCKED pages are nonreclaimableinclude/linux/pagemap.h include/linux/swap.h mm/shmem.c +1 more+100 -20 replies

Reviews trailers per patch

1 of 14 patches has a Reviewed-by or Acked-by.

PatchKOSAKI Motohiro
1/14
2/14
3/14
4/14
5/14
6/14
7/14R-b
8/14
9/14
10/14
11/14
12/14
13/14
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [patch 00/14] VM pageout scalability improvements (V7)

On large memory systems, the VM can spend way too much time scanning through pages that it cannot (or should not) evict from memory. Not only does it use up CPU time, but it also provokes lock contention and can leave large systems under memory presure in a catatonic state.

Against 2.6.25-rc2-mm1

This patch series improves VM scalability by:

1) putting filesystem backed, swap backed and non-reclaimable pages onto their own LRUs, so the system only scans the pages that it can/should evict from memory

2) switching to SEQ replacement for the anonymous LRUs, so the number of pages that need to be scanned when the system starts swapping is bound to a reasonable number

3) keeping non-reclaimable pages off the LRU completely, so the VM does not waste CPU time scanning them. Currently only ramfs and SHM_LOCKED pages are kept on the noreclaim list, mlock()ed VMAs will be added later

More info on the overall design can be found at:

http://linux-mm.org/PageReplacementDesign

An all-in-one patch can be found at:

http://people.redhat.com/riel/splitvm/

Changelog:
- improve swap space freeing to deal with COW shared space
(Lee Schermerhorn, Daisuke Nishimura & Minchan Kim)
- clean up PG_swapbacked setting in swapin path (Minchan Kim)
- properly invoke shrink_active_list for background aging (Minchan Kim)
- add authorship info to all patches (Rik van Riel)
- clean up (or move below ---) the comments for the commit logs (Rik van Riel)
- after some tests, reduce default swappiness to 20 for now (Rik van Riel)

- several code cleanups (minchan Kim)
- noreclaim patch refactoring and improvements (Lee Schermerhorn)
- several PROT_NONE and vma merging fixes (KOSAKI Motohiro)
- SMP bugfixes and efficiency improvements (Rik van Riel, Lee Schermerhorn)
- fix NUMA node stats printing (Lee Schermerhorn)
- remove the mlocked-VMA-noreclaim code for now, it still has bugs on IA64 and is holding up the merge (Rik van Riel)

- make page_alloc.c compile without CONFIG_NORECLAIM_MLOCK (minchan Kim)
- BUG() does not take an argument (minchan Kim)
- clean up is_active_lru and is_file_lru (Andy Whitcroft)
- clean up shrink_active_list temp list names (KOSAKI Motohiro)
- add total active & inactive memory totals for vmstat -a (KOSAKI Motohiro)
- only try global anon page aging on global lru scans (KOSAKI Motohiro)
- make function descriptions follow the kernel-doc format (Rik van Riel)
- simplify mlock_vma_pages_range and munlock_vma_pages_range (Lee Schermerhorn)
- remove some more arguments, rename to mlock_vma_pages_all (Lee Schermerhorn)
- many code cleanups (Lee Schermerhorn)
- pass correct vma arg to mlock_vma_pages_range from do_brk (Rik van Riel)
- port to 2.6.25-rc3-mm1

- pull the memcontrol lru arrayification earlier into the patch series
- use a pagevec array similar to the lru array
- clean up the code in various places
- improved pageout balancing and reduced pageout cpu use

- fix compilation on PPC and without memcontrol
- make page_is_pagecache more readable
- replace get_scan_ratio with correct version

- merge memcontroller split LRU code into the main split LRU patch, since it is not functionally different (it was split up only to help people who had seen the last version of the patch series review it)
- drop the page_file_cache debugging patch, since it never triggered
- reintroduce code to not scan anon list if swap is full
- add code to scan anon list if page cache is very small already
- use lumpy reclaim more aggressively for smaller order > 1 allocations

Signature · 1 line
All Rights Reversed