diff options
author | 2020-08-11 18:38:00 -0700 | |
---|---|---|
committer | 2020-08-12 10:58:03 -0700 | |
commit | a2a9e439baf8aca2af1e614fab7956c09091a6d1 (patch) | |
tree | a0faa0dcd1a5e534c7037b60ed9176c96d0e78c7 /arch/csky/mm/fault.c | |
parent | mm/arm64: use general page fault accounting (diff) | |
download | wireguard-linux-a2a9e439baf8aca2af1e614fab7956c09091a6d1.tar.xz wireguard-linux-a2a9e439baf8aca2af1e614fab7956c09091a6d1.zip |
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]>
Diffstat (limited to '')
-rw-r--r-- | arch/csky/mm/fault.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/arch/csky/mm/fault.c b/arch/csky/mm/fault.c index b252e6e4d32f..081b178b41b1 100644 --- a/arch/csky/mm/fault.c +++ b/arch/csky/mm/fault.c @@ -151,7 +151,7 @@ good_area: * the fault. */ fault = handle_mm_fault(vma, address, write ? FAULT_FLAG_WRITE : 0, - NULL); + regs); if (unlikely(fault & VM_FAULT_ERROR)) { if (fault & VM_FAULT_OOM) goto out_of_memory; @@ -161,16 +161,6 @@ good_area: goto bad_area; BUG(); } - if (fault & VM_FAULT_MAJOR) { - tsk->maj_flt++; - perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, - address); - } else { - tsk->min_flt++; - perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, - address); - } - mmap_read_unlock(mm); return; |