mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
FROMLIST: mm: add speculative page fault vmstats
Add speculative_pgfault vmstat counter to count successful speculative page fault handling. Also fixing a minor typo in include/linux/vm_event_item.h. Change-Id: I0d3f3dc5195e1156d4b8edf83aff9d8d85904e8e Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com> Link: https://lore.kernel.org/lkml/1523975611-15978-24-git-send-email-ldufour@linux.vnet.ibm.com/ Bug: 161210518 Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
This commit is contained in:
committed by
Suren Baghdasaryan
parent
99e15a0799
commit
caf05c003b
@@ -120,6 +120,9 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
|
||||
#ifdef CONFIG_SWAP
|
||||
SWAP_RA,
|
||||
SWAP_RA_HIT,
|
||||
#endif
|
||||
#ifdef CONFIG_SPECULATIVE_PAGE_FAULT
|
||||
SPECULATIVE_PGFAULT,
|
||||
#endif
|
||||
NR_VM_EVENT_ITEMS
|
||||
};
|
||||
|
||||
@@ -5014,6 +5014,7 @@ int __handle_speculative_fault(struct mm_struct *mm, unsigned long address,
|
||||
* If there is no need to retry, don't return the vma to the caller.
|
||||
*/
|
||||
if (ret != VM_FAULT_RETRY) {
|
||||
count_vm_event(SPECULATIVE_PGFAULT);
|
||||
put_vma(vmf.vma);
|
||||
*vma = NULL;
|
||||
}
|
||||
|
||||
@@ -1348,6 +1348,9 @@ const char * const vmstat_text[] = {
|
||||
"swap_ra",
|
||||
"swap_ra_hit",
|
||||
#endif
|
||||
#ifdef CONFIG_SPECULATIVE_PAGE_FAULT
|
||||
"speculative_pgfault"
|
||||
#endif
|
||||
#endif /* CONFIG_VM_EVENT_COUNTERS || CONFIG_MEMCG */
|
||||
};
|
||||
#endif /* CONFIG_PROC_FS || CONFIG_SYSFS || CONFIG_NUMA || CONFIG_MEMCG */
|
||||
|
||||
Reference in New Issue
Block a user