From: xu xin <xu.xin16@xxxxxxxxxx> 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(-) -- 2.25.1