]> git.baikalelectronics.ru Git - kernel.git/commit
mm: zswap: add basic meminfo and vmstat coverage
authorJohannes Weiner <hannes@cmpxchg.org>
Thu, 19 May 2022 21:08:53 +0000 (14:08 -0700)
committerakpm <akpm@linux-foundation.org>
Thu, 19 May 2022 21:08:53 +0000 (14:08 -0700)
commitbcbfd4f3ab8002cabcaed1ef4f1bfa7f53091a2a
treeb35704e2a62cc7630d06658fc6faaeba24b18e2a
parentcfa7fdd52c23a0c5a1b549145233a81903c9b41f
mm: zswap: add basic meminfo and vmstat coverage

Currently it requires poking at debugfs to figure out the size and
population of the zswap cache on a host.  There are no counters for reads
and writes against the cache.  As a result, it's difficult to understand
zswap behavior on production systems.

Print zswap memory consumption and how many pages are zswapped out in
/proc/meminfo.  Count zswapouts and zswapins in /proc/vmstat.

Link: https://lkml.kernel.org/r/20220510152847.230957-6-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Dan Streetman <ddstreet@ieee.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Roman Gushchin <guro@fb.com>
Cc: Seth Jennings <sjenning@redhat.com>
Cc: Shakeel Butt <shakeelb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Documentation/filesystems/proc.rst
fs/proc/meminfo.c
include/linux/swap.h
include/linux/vm_event_item.h
mm/vmstat.c
mm/zswap.c