linux/arch/loongarch
Qi Zheng 14c2ac3681 LoongArch: update local TLB if PTE entry exists
Currently, the implementation of update_mmu_tlb() is empty if
__HAVE_ARCH_UPDATE_MMU_TLB is not defined.  Then if two threads
concurrently fault at the same page, the second thread that did not win
the race will give up and do nothing.  In the LoongArch architecture, this
second thread will trigger another fault, and only updates its local TLB.

Instead of triggering another fault, it's better to implement
update_mmu_tlb() to directly update the local TLB of the second thread. 
Just do it.

Link: https://lkml.kernel.org/r/20220929112318.32393-3-zhengqi.arch@bytedance.com
Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
Suggested-by: Bibo Mao <maobibo@loongson.cn>
Acked-by: Huacai Chen <chenhuacai@loongson.cn>
Cc: Chris Zankel <chris@zankel.net>
Cc: David Hildenbrand <david@redhat.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-10-12 18:51:50 -07:00
..
boot
configs LoongArch: Update Loongson-3 default config file 2022-08-12 13:10:11 +08:00
include LoongArch: update local TLB if PTE entry exists 2022-10-12 18:51:50 -07:00
kernel LoongArch: Cleanup reset routines with new API 2022-08-25 19:34:59 +08:00
lib LoongArch: Remove useless header compiler.h 2022-07-29 18:22:32 +08:00
mm LoongArch: mm: Avoid unnecessary page fault retires on shared memory types 2022-08-25 19:34:59 +08:00
pci LoongArch: Add PCI controller support 2022-08-12 13:10:11 +08:00
vdso LoongArch: Fix build warnings in VDSO 2022-08-25 19:34:59 +08:00
Kbuild
Kconfig arch: mm: rename FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER 2022-09-11 20:25:56 -07:00
Kconfig.debug LoongArch: Add prologue unwinder support 2022-08-12 13:10:11 +08:00
Makefile LoongArch: Add PCI controller support 2022-08-12 13:10:11 +08:00