mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-21 09:08:45 +07:00
mm/powerpc: use general page fault accounting
Use the general page fault accounting by passing regs into handle_mm_fault(). Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Michael Ellerman <mpe@ellerman.id.au> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Link: http://lkml.kernel.org/r/20200707225021.200906-17-peterx@redhat.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
af8a792627
commit
428fdc0944
@ -511,7 +511,7 @@ static int __do_page_fault(struct pt_regs *regs, unsigned long address,
|
||||
* make sure we exit gracefully rather than endlessly redo
|
||||
* the fault.
|
||||
*/
|
||||
fault = handle_mm_fault(vma, address, flags, NULL);
|
||||
fault = handle_mm_fault(vma, address, flags, regs);
|
||||
|
||||
major |= fault & VM_FAULT_MAJOR;
|
||||
|
||||
@ -537,14 +537,9 @@ static int __do_page_fault(struct pt_regs *regs, unsigned long address,
|
||||
/*
|
||||
* Major/minor page fault accounting.
|
||||
*/
|
||||
if (major) {
|
||||
current->maj_flt++;
|
||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, address);
|
||||
if (major)
|
||||
cmo_account_page_fault();
|
||||
} else {
|
||||
current->min_flt++;
|
||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
NOKPROBE_SYMBOL(__do_page_fault);
|
||||
|
Loading…
Reference in New Issue
Block a user