[PATCH 0/9] Convert all THP vmstat counters to pages

From: Muchun Song
Date: Sat Dec 05 2020 - 12:07:58 EST


Hi,

This patch series is aimed to convert all THP vmstat counters to pages
and the kernel stack vmstat counter to bytes.

The unit of some vmstat counters are pages, the unit of some vmstat counters
are bytes, the unit of some vmstat counters are HPAGE_PMD_NR, and the unit
of some vmstat counters are KiB. When we want to expose these vmstat counters
to the userspace, we have to know the unit of the vmstat counters is which
one. It makes the code complex.

This patch series can make the code simple. And the unit of the vmstat
counters are either pages or bytes.

This was inspired by Johannes and Roman. Thanks to them.

Muchun Song (9):
mm: vmstat: fix stat_threshold for NR_KERNEL_STACK_KB
mm: memcontrol: fix NR_ANON_THPS account
mm: memcontrol: convert kernel stack account to byte-sized
mm: memcontrol: convert NR_ANON_THPS account to pages
mm: memcontrol: convert NR_FILE_THPS account to pages
mm: memcontrol: convert NR_SHMEM_THPS account to pages
mm: memcontrol: convert NR_SHMEM_PMDMAPPED account to pages
mm: memcontrol: convert NR_FILE_PMDMAPPED account to pages
mm: memcontrol: make the slab calculation consistent

drivers/base/node.c | 17 +++---
fs/proc/meminfo.c | 12 ++---
include/linux/mmzone.h | 2 +-
kernel/fork.c | 8 +--
mm/filemap.c | 4 +-
mm/huge_memory.c | 9 ++--
mm/khugepaged.c | 4 +-
mm/memcontrol.c | 139 +++++++++++++++++++++++++------------------------
mm/page_alloc.c | 9 ++--
mm/rmap.c | 19 ++++---
mm/shmem.c | 3 +-
mm/vmstat.c | 4 ++
12 files changed, 120 insertions(+), 110 deletions(-)

--
2.11.0