mbox series

[RFC,0/4] propose a auto-run mode for ksm

Message ID 20220803100306.1653382-1-xu.xin16@zte.con.cn (mailing list archive)
Headers show
Series propose a auto-run mode for ksm | expand

Message

CGEL Aug. 3, 2022, 10:03 a.m. UTC
From: xu xin <xu.xin16@zte.com.cn>

The following patch series bring a NEW running state "auto mode". In
traditional KSM, whether ksmd works scanning and merging or not
depends on the sysfs klob ksm_run.

Most of time, letting ksmd run is not very much needed, for example,
when memory is sufficient, because it increases the delays of COW for
user applications and also consume some cpu resource. 

Besides, the fixed pages_to_scan is not always good. When there are a
lot of same pages, the default pages_to_scan makes ksmd so slow to merge
them.

The four patches try to optimize the above two points with a auto mode.
It's a lightweight optimization to KSM.

xu xin (4):
  ksm: propose a auto-run mode of ksm
  ksm: implement scan-enhanced algorithm of auto mode
  ksm: let ksmd work automatically with memory threshold
  ksm: show ksmd status of auto mode

 mm/ksm.c | 212 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 206 insertions(+), 6 deletions(-)