On Thu, Mar 31, 2022 at 06:44:31PM +0700, Bagas Sanjaya wrote: > On 31/03/22 10.56, cgel.zte@xxxxxxxxx wrote: > > +Monitoring KSM events > > +===================== > > + > > +There are some counters in /proc/vmstat that may be used to monitor KSM events. > > +KSM might help save memory, it's a tradeoff by may suffering delay on KSM COW > > +or on swapping in copy. Those events could help users evaluate whether or how > > +to use KSM. For example, if cow_ksm increases too fast, user may decrease the > > +range of madvise(, , MADV_MERGEABLE). > > + > > Did you mean "tradeoff between possible delay on KSM COW and swapping > in copy"? > I mean both are tradeoff, or in other words KSM sacrifices time to gain space. KSM COW please see do_wp_page(), KSM swapping in copy see ksm_might_need_to_copy(). Thanks. > -- > An old man doll... just what I always wanted! - Clara