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>
Showing
- Documentation/filesystems/proc.rst 6 additions, 0 deletionsDocumentation/filesystems/proc.rst
- fs/proc/meminfo.c 7 additions, 0 deletionsfs/proc/meminfo.c
- include/linux/swap.h 5 additions, 0 deletionsinclude/linux/swap.h
- include/linux/vm_event_item.h 4 additions, 0 deletionsinclude/linux/vm_event_item.h
- mm/vmstat.c 4 additions, 0 deletionsmm/vmstat.c
- mm/zswap.c 6 additions, 7 deletionsmm/zswap.c
Please register or sign in to comment