]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/page_alloc: make the annotations of available memory more accurate
authorYang Yang <yang.yang29@zte.com.cn>
Thu, 23 Jun 2022 02:08:34 +0000 (02:08 +0000)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 20 Jul 2022 00:15:12 +0000 (20:15 -0400)
commit5152f794109852e2f15621cf61529bccc9f5fefa
treef43a18638e137b1c5625af3819edac93115a3627
parent47ccb42187e695f8d42becca54d47abbeae2e2ac
mm/page_alloc: make the annotations of available memory more accurate

Not all systems use swap, so estimating available memory would help to
prevent swapping or OOM of system that not use swap.

And we need to reserve some page cache to prevent swapping or thrashing.
If somebody is accessing the pages in pagecache, and if too much would be
freed, most accesses might mean reading data from disk, i.e.  thrashing.

Link: https://lkml.kernel.org/r/20220623020833.972979-1-yang.yang29@zte.com.cn
Signed-off-by: Yang Yang <yang.yang29@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c