]> git.baikalelectronics.ru Git - kernel.git/commit
mm/damon: introduce DAMON-based LRU-lists Sorting
authorSeongJae Park <sj@kernel.org>
Mon, 13 Jun 2022 19:23:00 +0000 (19:23 +0000)
committerakpm <akpm@linux-foundation.org>
Mon, 4 Jul 2022 01:08:43 +0000 (18:08 -0700)
commit7a6c0f0f0184af031e1068e03e82d8fed7229c58
tree4b19d4d01255ce56c603b55799e0b6914d8491f7
parent006a6c3babbfe54a0e86865f6f608c92dce5121e
mm/damon: introduce DAMON-based LRU-lists Sorting

Users can do data access-aware LRU-lists sorting using 'LRU_PRIO' and
'LRU_DEPRIO' DAMOS actions.  However, finding best parameters including
the hotness/coldness thresholds, CPU quota, and watermarks could be
challenging for some users.  To make the scheme easy to be used without
complex tuning for common situations, this commit implements a static
kernel module called 'DAMON_LRU_SORT' using the 'LRU_PRIO' and
'LRU_DEPRIO' DAMOS actions.

It proactively sorts LRU-lists using DAMON with conservatively chosen
default values of the parameters.  That is, the module under its default
parameters will make no harm for common situations but provide some level
of efficiency improvements for systems having clear hot/cold access
pattern under a level of memory pressure while consuming only a limited
small portion of CPU time.

Link: https://lkml.kernel.org/r/20220613192301.8817-9-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/Kconfig
mm/damon/Makefile
mm/damon/lru_sort.c [new file with mode: 0644]