On Thu 09-06-22 05:56:58, cgel.zte@xxxxxxxxx wrote: > From: xu xin <xu.xin16@xxxxxxxxxx> > > Up to now, KSM is apparently useful to save memory not just for VM but for > normal applications. But upper application developers might not know much > about KSM or whether they should use madvise(xxx, MERGEABLE) while there > indeed exist a lot of same pages in their apps. Some application developers > urgently need the kernel to provide an interface of KSM debugging mode to > see the maximum potential merging of the whole system, so the patch is. I disagree with this. As already discussed in previous proposals of KSM related interfaces KSM is a nice tool but it shouldn't be used without understanding of all the consequences. Maybe we should be more verbose about how to use KSM properly and also describe best practices but I do not think that enable-for-all in any form is a good interface. Nack to the interface. -- Michal Hocko SUSE Labs