Skip to content

VM pageout scalability improvements

Rik van Riel linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest21 patches 38 repliesIn review

Changelog from the cover letter

- 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/21move isolate_lru_page() to vmscan.cinclude/linux/migrate.h mm/internal.h mm/mempolicy.c +2 more+60 -423 replies
2/21Use an indexed array for LRU variablesinclude/linux/memcontrol.h include/linux/mm_inline.h include/linux/mmzone.h +5 more+158 -1802 replies
3/21use an array for the LRU pagevecsinclude/linux/mmzone.h include/linux/pagevec.h include/linux/swap.h +2 more+76 -685 replies
4/21free swap space on swap-in/activationinclude/linux/pagevec.h mm/swap.c mm/vmscan.c+26 -02 replies
5/21define page_file_cache() functioninclude/linux/mm_inline.h include/linux/page-flags.h mm/memory.c +4 more+38 -01 reply
6/21split LRU lists into anon & file setsdrivers/base/node.c fs/cifs/file.c fs/nfs/dir.c +19 more+488 -3902 replies
7/21SEQ replacement for anonymous pagesinclude/linux/mm_inline.h include/linux/mmzone.h mm/page_alloc.c +2 more+92 -81 reply
8/21(NEW) add some sanity checks to get_scan_ratioinclude/linux/mmzone.h mm/page_alloc.c mm/swap.c +1 more+77 -361 reply
9/21(NEW) improve reclaim balancingmm/vmscan.c+9 -12 replies
10/21add newly swapped in pages to the inactive listmm/swap_state.c+1 -10 replies
11/21(NEW) more aggressively use lumpy reclaimmm/vmscan.c+16 -42 replies
12/21No Reclaim LRU Infrastructureinclude/linux/mm_inline.h include/linux/mmzone.h include/linux/page-flags.h +9 more+270 -359 replies
13/21Non-reclaimable page statisticsdrivers/base/node.c fs/proc/proc_misc.c mm/page_alloc.c +1 more+30 -10 replies
14/21scan noreclaim list for reclaimable pagesdrivers/base/node.c include/linux/swap.h kernel/sysctl.c +1 more+171 -02 replies
15/21ramfs pages are non-reclaimabledrivers/block/brd.c fs/ramfs/inode.c include/linux/pagemap.h +1 more+40 -00 replies
16/21SHM_LOCKED pages are nonreclaimableinclude/linux/pagemap.h include/linux/swap.h mm/shmem.c +1 more+99 -190 replies
17/21non-reclaimable mlocked pagesinclude/linux/page-flags.h include/linux/rmap.h mm/Kconfig +7 more+509 -441 reply
18/21mlock vma pages under mmap_sem held for readmm/internal.h mm/mlock.c+64 -120 replies
19/21handle mlocked pages during map/unmap and truncatemm/filemap.c mm/mmap.c mm/mremap.c +2 more+59 -90 replies
20/21account mlocked pagesdrivers/base/node.c fs/proc/proc_misc.c include/linux/mmzone.h +3 more+56 -130 replies
21/21cull non-reclaimable anon pages from the LRU at fault timemm/memory.c mm/swap_state.c+9 -62 replies

Reviews trailers per patch

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

PatchKOSAKI Motohiro
1/21
2/21
3/21
4/21
5/21
6/21
7/21R-b
8/21
9/21
10/21
11/21
12/21
13/21
14/21
15/21
16/21
17/21
18/21
19/21
20/21
21/21

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/21] VM pageout scalability improvements

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.24-rc6-mm1

This patch series improves VM scalability by:

1) making the locking a little more scalable

2) 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

3) 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

More info on the overall design can be found at:

http://linux-mm.org/PageReplacementDesign

Changelog:
- 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 · 7 lines
All Rights Reversed

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>