[PATCH v2 6/7] s390: mm: accelerate pagefault when badaccess
Heiko Carstens
hca at linux.ibm.com
Sun Apr 7 10:19:52 PDT 2024
On Wed, Apr 03, 2024 at 04:38:04PM +0800, Kefeng Wang wrote:
> The vm_flags of vma already checked under per-VMA lock, if it is a
> bad access, directly handle error, no need to retry with mmap_lock
> again. Since the page faut is handled under per-VMA lock, count it
> as a vma lock event with VMA_LOCK_SUCCESS.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang at huawei.com>
> ---
> arch/s390/mm/fault.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
> index c421dd44ffbe..162ca2576fd4 100644
> --- a/arch/s390/mm/fault.c
> +++ b/arch/s390/mm/fault.c
> @@ -325,7 +325,8 @@ static void do_exception(struct pt_regs *regs, int access)
> goto lock_mmap;
> if (!(vma->vm_flags & access)) {
> vma_end_read(vma);
> - goto lock_mmap;
> + count_vm_vma_lock_event(VMA_LOCK_SUCCESS);
> + return handle_fault_error_nolock(regs, SEGV_ACCERR);
Reviewed-by: Heiko Carstens <hca at linux.ibm.com>
More information about the linux-arm-kernel
mailing list