mm/ksm: add pages_skipped metric
authorStefan Roesch <shr@devkernel.io>
Tue, 26 Sep 2023 04:09:37 +0000 (21:09 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 16 Oct 2023 22:44:39 +0000 (15:44 -0700)
commite5a68991268906a6989f1bf273580c2218662ad6
tree02b6ea1bc78a1dc5c5f7b584c006007350fecbf9
parent5e924ff54d088828794d9f1a4d5bf17808f7270e
mm/ksm: add pages_skipped metric

This change adds the "pages skipped" metric.  To be able to evaluate how
successful smart page scanning is, the pages skipped metric can be
compared to the pages scanned metric.

The pages skipped metric is a cumulative counter.  The counter is stored
under /sys/kernel/mm/ksm/pages_skipped.

Link: https://lkml.kernel.org/r/20230926040939.516161-3-shr@devkernel.io
Signed-off-by: Stefan Roesch <shr@devkernel.io>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Rik van Riel <riel@surriel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/ksm.c