diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory.c | 4 | ||||
-rw-r--r-- | mm/vmstat.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/mm/memory.c b/mm/memory.c index 8895dd2f2255..e873a6143181 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3331,6 +3331,10 @@ copy: get_page(vmf->page); pte_unmap_unlock(vmf->pte, vmf->ptl); +#ifdef CONFIG_KSM + if (PageKsm(vmf->page)) + count_vm_event(COW_KSM); +#endif return wp_page_copy(vmf); } diff --git a/mm/vmstat.c b/mm/vmstat.c index f2d0dec1062d..b94a2e4723ff 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -1393,6 +1393,9 @@ const char * const vmstat_text[] = { "ksm_swpin_copy", #endif #endif +#ifdef CONFIG_KSM + "cow_ksm", +#endif #ifdef CONFIG_X86 "direct_map_level2_splits", "direct_map_level3_splits", |