Skip to content

Commit a2a9e43

Browse files
xzpetertorvalds
authored andcommitted
mm/csky: 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: Guo Ren <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent 6a1bb02 commit a2a9e43

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

arch/csky/mm/fault.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long write,
151151
* the fault.
152152
*/
153153
fault = handle_mm_fault(vma, address, write ? FAULT_FLAG_WRITE : 0,
154-
NULL);
154+
regs);
155155
if (unlikely(fault & VM_FAULT_ERROR)) {
156156
if (fault & VM_FAULT_OOM)
157157
goto out_of_memory;
@@ -161,16 +161,6 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long write,
161161
goto bad_area;
162162
BUG();
163163
}
164-
if (fault & VM_FAULT_MAJOR) {
165-
tsk->maj_flt++;
166-
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs,
167-
address);
168-
} else {
169-
tsk->min_flt++;
170-
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs,
171-
address);
172-
}
173-
174164
mmap_read_unlock(mm);
175165
return;
176166

0 commit comments

Comments
 (0)