VM pageout scalability improvements (V12)
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest24 patches 19 repliesIn review
Changelog from the cover letter · 64 lines
- fix the merge bugs
- leave swappiness at 60, if only to demonstrate why that value is wrong with the new code (hi Andrew)
- update Documentation/vm/unevictable-lru.txt until my hands hurt from typing
- rename try_to_unlock to try_to_munlock
- remove CONFIG_NORECLAIM_MLOCK, only use CONFIG_UNEVICTABLE_LRU
- Aunt Tillified the CONFIG_UNEVICTABLE_LRU description
- make CONFIG_NORECLAIM_LRU no longer depend on 64BIT and default y
- rename NORECLAIM to UNEVICTABLE as suggested by Andrew Morton
- fix vmscan-fix-pagecache-reclaim-referenced-bit-check.patch so the referenced bit set test is the same as the shrink_page_list test
- add comments everywhere
- rename inactive_anon_low to inactive_anon_is_low
- use an array for lru stats in meminfo_read_proc
- pull patch 08/25 into 06 and 07 to ease reviewing
Andrew: please remove vmscan-add-some-sanity-checks-to-get_scan_ratio.patch
- rename page_file_cache to page_is_file_cache
- pull page_lru() into patch 02/25 (Rik van Riel)
- use NR_LRU_BASE and LRU_BASE as base for calculations
- make zone->lru stuff cache friendly as suggested by Andrew Morton
- merge in all of Lee's mlock changes
- fix shrink_list memcgroup balancing (KOSAKI Motohiro)
- fix balancing stats in shrink_active_list (Daisuke Nishimura)
- make sure previously active pagecache pages get reactivated on the first access (Rik van Riel)
- compile fix when !CONFIG_SWAP (MinChan Kim)
- clean up page-flags.h defines when !CONFIG_NORECLAIM_LRU (Lee Schermerhorn)
- fix some race conditions around moving pages to and from the noreclaim list (Lee Schermerhorn, KOSAKI Motohiro)
- use putback_lru_page() for page migration (Lee Schermerhorn)
- fix potential SHM_UNLOCK race in scan_mapping_noreclaim_pages() (Lee Schermerhorn, KOSAKI Motohiro)
- 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 files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/24 | vmscan: move isolate_lru_page() to vmscan.cinclude/ mm/ mm/ +2 more | +57 | 0 replies | |
| 2/24 | vmscan: Use an indexed array for LRU variablesinclude/ include/ include/ +5 more | +171 | 0 replies | |
| 3/24 | swap: use an array for the LRU pagevecsinclude/ include/ mm/ +1 more | +55 | 0 replies | |
| 4/24 | vmscan: free swap space on swap-in/activationinclude/ include/ mm/ +2 more | +60 | 0 replies | |
| 5/24 | define page_file_cache() functioninclude/ include/ mm/ +4 more | +42 | 0 replies | |
| 6/24 | vmscan: split LRU lists into anon & file setsdrivers/ fs/ fs/ +19 more | +519 | 4 replies | |
| 7/24 | vmscan: second chance replacement for anonymous pagesinclude/ include/ mm/ +2 more | +112 | 0 replies | |
| 8/24 | vmscan: fix pagecache reclaim referenced bit checkmm/ | +9 | 0 replies | |
| 9/24 | vmscan: add newly swapped in pages to the inactive listmm/ | +1 | 0 replies | |
| 10/24 | more aggressively use lumpy reclaimmm/ | +16 | 0 replies | |
| 11/24 | pageflag helpers for configed-out flagsinclude/ | +12 | 8 replies | |
| 12/24 | Unevictable LRU Infrastructureinclude/ include/ include/ +11 more | +370 | 0 replies | |
| 13/24 | Unevictable LRU Page Statisticsdrivers/ fs/ mm/ +2 more | +36 | 0 replies | |
| 14/24 | Ramfs and Ram Disk pages are unevictabledrivers/ fs/ include/ +1 more | +41 | 5 replies | |
| 15/24 | SHM_LOCKED pages are unevictableinclude/ include/ include/ +3 more | +136 | 0 replies | |
| 16/24 | mlock: mlocked pages are unevictableinclude/ include/ include/ +9 more | +731 | 0 replies | |
| 17/24 | mlock: downgrade mmap sem while populating mlocked regionsmm/ | +43 | 0 replies | |
| 18/24 | mmap: handle mlocked pages during map, remap, unmapmm/ mm/ mm/ +3 more | +99 | 0 replies | |
| 19/24 | vmstat: mlocked pages statisticsdrivers/ fs/ include/ +3 more | +47 | 0 replies | |
| 20/24 | swap: cull unevictable pages in fault pathinclude/ mm/ mm/ | +35 | 0 replies | |
| 21/24 | vmstat: unevictable and mlocked pages vm eventsinclude/ mm/ mm/ +2 more | +62 | 0 replies | |
| 22/24 | vmscan: unevictable LRU scan sysctldrivers/ include/ include/ +3 more | +198 | 0 replies | |
| 23/24 | mlock: count attempts to free mlocked pageinclude/ mm/ mm/ +1 more | +20 | 0 replies | |
| 24/24 | doc: unevictable LRU and mlocked pages documentationDocumentation/ | +609 | 0 replies |
Reviews trailers per patch
1 of 24 patches has a Reviewed-by or Acked-by.
| Patch | Hiroshi Shimamoto | KOSAKI Motohiro |
|---|---|---|
| 1/24 | ||
| 2/24 | ||
| 3/24 | ||
| 4/24 | ||
| 5/24 | ||
| 6/24 | Debugged-by | R-b |
| 7/24 | ||
| 8/24 | ||
| 9/24 | ||
| 10/24 | ||
| 11/24 | ||
| 12/24 | ||
| 13/24 | ||
| 14/24 | ||
| 15/24 | ||
| 16/24 | ||
| 17/24 | ||
| 18/24 | ||
| 19/24 | ||
| 20/24 | ||
| 21/24 | ||
| 22/24 | ||
| 23/24 | ||
| 24/24 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH -mm 00/24] VM pageout scalability improvements (V12)
Andrew, this is the promised drop-in replacement for the patch series, with all the cleanups you requested since friday as well as the bugfixes I came up with this morning.
You can drop vmscan-add-some-sanity-checks-to-get_scan_ratio.patch and the incremental changes - those are all folded in to these patches.
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.
This patch series improves VM scalability by:
1) putting filesystem backed, swap backed and unevictable pages onto their own LRUs, so the system only scans the pages that it can/should evict from memory
2) switching to two handed clock 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 unevictable pages off the LRU completely, so the VM does not waste CPU time scanning them. ramfs, ramdisk, SHM_LOCKED shared memory segments and mlock()ed VMA pages are keept on the unevictable list.
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:
- fix the merge bugs
- leave swappiness at 60, if only to demonstrate why that value is wrong with the new code (hi Andrew)
- update Documentation/vm/unevictable-lru.txt until my hands hurt from typing
- rename try_to_unlock to try_to_munlock
- remove CONFIG_NORECLAIM_MLOCK, only use CONFIG_UNEVICTABLE_LRU
- Aunt Tillified the CONFIG_UNEVICTABLE_LRU description
- make CONFIG_NORECLAIM_LRU no longer depend on 64BIT and default y
- rename NORECLAIM to UNEVICTABLE as suggested by Andrew Morton
- fix vmscan-fix-pagecache-reclaim-referenced-bit-check.patch so the referenced bit set test is the same as the shrink_page_list test
- add comments everywhere
- rename inactive_anon_low to inactive_anon_is_low
- use an array for lru stats in meminfo_read_proc
- pull patch 08/25 into 06 and 07 to ease reviewing
Andrew: please remove vmscan-add-some-sanity-checks-to-get_scan_ratio.patch
- rename page_file_cache to page_is_file_cache
- pull page_lru() into patch 02/25 (Rik van Riel)
- use NR_LRU_BASE and LRU_BASE as base for calculations
- make zone->lru stuff cache friendly as suggested by Andrew Morton
- merge in all of Lee's mlock changes
- fix shrink_list memcgroup balancing (KOSAKI Motohiro)
- fix balancing stats in shrink_active_list (Daisuke Nishimura)
- make sure previously active pagecache pages get reactivated on the first access (Rik van Riel)
- compile fix when !CONFIG_SWAP (MinChan Kim)
- clean up page-flags.h defines when !CONFIG_NORECLAIM_LRU (Lee Schermerhorn)
- fix some race conditions around moving pages to and from the noreclaim list (Lee Schermerhorn, KOSAKI Motohiro)
- use putback_lru_page() for page migration (Lee Schermerhorn)
- fix potential SHM_UNLOCK race in scan_mapping_noreclaim_pages() (Lee Schermerhorn, KOSAKI Motohiro)
- 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