Commit 798a6b87 authored by Peter Xu's avatar Peter Xu Committed by Linus Torvalds

mm: Add PGREUSE counter

This accounts for wp_page_reuse() case, where we reused a page for COW.
Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a308c71b
...@@ -30,6 +30,7 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, ...@@ -30,6 +30,7 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
PGFAULT, PGMAJFAULT, PGFAULT, PGMAJFAULT,
PGLAZYFREED, PGLAZYFREED,
PGREFILL, PGREFILL,
PGREUSE,
PGSTEAL_KSWAPD, PGSTEAL_KSWAPD,
PGSTEAL_DIRECT, PGSTEAL_DIRECT,
PGSCAN_KSWAPD, PGSCAN_KSWAPD,
......
...@@ -2619,6 +2619,7 @@ static inline void wp_page_reuse(struct vm_fault *vmf) ...@@ -2619,6 +2619,7 @@ static inline void wp_page_reuse(struct vm_fault *vmf)
if (ptep_set_access_flags(vma, vmf->address, vmf->pte, entry, 1)) if (ptep_set_access_flags(vma, vmf->address, vmf->pte, entry, 1))
update_mmu_cache(vma, vmf->address, vmf->pte); update_mmu_cache(vma, vmf->address, vmf->pte);
pte_unmap_unlock(vmf->pte, vmf->ptl); pte_unmap_unlock(vmf->pte, vmf->ptl);
count_vm_event(PGREUSE);
} }
/* /*
......
...@@ -1198,6 +1198,7 @@ const char * const vmstat_text[] = { ...@@ -1198,6 +1198,7 @@ const char * const vmstat_text[] = {
"pglazyfreed", "pglazyfreed",
"pgrefill", "pgrefill",
"pgreuse",
"pgsteal_kswapd", "pgsteal_kswapd",
"pgsteal_direct", "pgsteal_direct",
"pgscan_kswapd", "pgscan_kswapd",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment