Skip to content

Commit 56e10e6

Browse files
xzpetertorvalds
authored andcommitted
mm/sparc32: 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 105f886 commit 56e10e6

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

arch/sparc/mm/fault_32.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
234234
* make sure we exit gracefully rather than endlessly redo
235235
* the fault.
236236
*/
237-
fault = handle_mm_fault(vma, address, flags, NULL);
237+
fault = handle_mm_fault(vma, address, flags, regs);
238238

239239
if (fault_signal_pending(fault, regs))
240240
return;
@@ -250,15 +250,6 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
250250
}
251251

252252
if (flags & FAULT_FLAG_ALLOW_RETRY) {
253-
if (fault & VM_FAULT_MAJOR) {
254-
current->maj_flt++;
255-
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ,
256-
1, regs, address);
257-
} else {
258-
current->min_flt++;
259-
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN,
260-
1, regs, address);
261-
}
262253
if (fault & VM_FAULT_RETRY) {
263254
flags |= FAULT_FLAG_TRIED;
264255

0 commit comments

Comments
 (0)