Skip to content

Commit f08147d

Browse files
xzpetertorvalds
authored andcommitted
mm/sparc64: use general page fault accounting
Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. Signed-off-by: Peter Xu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Acked-by: David S. Miller <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent 56e10e6 commit f08147d

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

arch/sparc/mm/fault_64.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
422422
goto bad_area;
423423
}
424424

425-
fault = handle_mm_fault(vma, address, flags, NULL);
425+
fault = handle_mm_fault(vma, address, flags, regs);
426426

427427
if (fault_signal_pending(fault, regs))
428428
goto exit_exception;
@@ -438,15 +438,6 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
438438
}
439439

440440
if (flags & FAULT_FLAG_ALLOW_RETRY) {
441-
if (fault & VM_FAULT_MAJOR) {
442-
current->maj_flt++;
443-
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ,
444-
1, regs, address);
445-
} else {
446-
current->min_flt++;
447-
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN,
448-
1, regs, address);
449-
}
450441
if (fault & VM_FAULT_RETRY) {
451442
flags |= FAULT_FLAG_TRIED;
452443

0 commit comments

Comments
 (0)