]> git.baikalelectronics.ru Git - kernel.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)
committerakpm <akpm@linux-foundation.org>
Mon, 4 Jul 2022 01:08:50 +0000 (18:08 -0700)
commitc28123c29a7e64cc4690e711c7c017bd9c2fb7b4
treeeb6d24fdc04c955c626a1b4f6cc0c8cc33390eb7
parent1c0c2ccd35ce2e8d97d0fff0b8255eb4799be8d1
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