Skip to content

RFC split anon and file LRUs

Rik van Riel linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest10 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10move isolate_lru_page to vmscan.cinclude/linux/migrate.h mm/internal.h mm/mempolicy.c +2 more+61 -421 reply
2/10free swap space entries if vm_swap_full()include/linux/pagevec.h mm/swap.c mm/vmscan.c+30 -52 replies
3/10define page_file_cacheinclude/linux/mm_inline.h include/linux/page-flags.h mm/memory.c +4 more+37 -09 replies
4/10debug page_file_cacheinclude/linux/mm_inline.h mm/shmem.c+12 -20 replies
5/10use an indexed array for LRU lists and variablesinclude/linux/mm_inline.h include/linux/mmzone.h mm/page_alloc.c +3 more+107 -900 replies
6/10split anon and file LRUsdrivers/base/node.c fs/cifs/file.c fs/nfs/dir.c +20 more+497 -3172 replies
7/10clean up the LRU array arithmeticinclude/linux/mm_inline.h include/linux/mmzone.h mm/swap.c +1 more+27 -160 replies
8/10make split VM and lumpy reclaim work togethermm/vmscan.c+26 -230 replies
9/10split VM and memory controllersmm/memcontrol.c+6 -10 replies
10/10add swapped in pages to the inactive listmm/swap_state.c+1 -10 replies

Reviews trailers per patch

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

PatchChristoph Lameter
1/10R-b
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

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

Read the v1 thread

Cover letter [RFC PATCH 0/10] split anon and file LRUs

The current page replacement scheme in Linux has a number of problems, which can be boiled down to:
- Sometimes the kernel evicts the wrong pages, which can result in bad performance.
- The kernel scans over pages that should not be evicted. On systems with a few GB of RAM, this can result in the VM using an annoying amount of CPU. On systems with >128GB of RAM, this can knock the system out for hours since excess CPU use is compounded with lock contention and other issues.

This patch series tries to address the issues by splitting the LRU lists into two sets, one for swap/ram backed pages ("anon") and one for filesystem backed pages ("file").

The current version only has the infrastructure. Large changes to the page replacement policy will follow later.

More details can be found on this page:

http://linux-mm.org/PageReplacementDesign

TODO:
- have any mlocked and ramfs pages live off of the LRU list, so we do not need to scan these pages
- switch to SEQ replacement for the anon LRU lists, so the worst case number of pages to scan is reduced greatly.
- figure out if the file LRU lists need page replacement changes to help with worst case scenarios
- implement and benchmark a scalable non-resident page tracking implementation in the radix tree, this may make the anon/file balancing algorithm more stable and could allow for further simplifications in the balancing algorithm

Signature · 9 lines
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

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