MIPS: make userspace mapping young by default

Linux Kernel / Linux Kernel - Huang Pei [loongson.cn] - 26 February 2021 17:41 UTC

MIPS page fault path(except huge page) takes 3 exceptions (1 TLB Miss + 2 TLB Invalid), butthe second TLB Invalid exception is just triggered by __update_tlb from do_page_fault writing tlb without _PAGE_VALID set. With this patch, user space mapping prot is made young by default (with both _PAGE_VALID and _PAGE_YOUNG set), and it only take 1 TLB Miss + 1 TLB Invalid exception

Remove pte_sw_mkyoung without polluting MM code and make page fault delay of MIPS on par with other architecture

Link: https://lkml.kernel.org/r/20210204013942.8398-1-huangpei@loongson.cn

f685a533a7fa MIPS: make userspace mapping young by default
arch/mips/mm/cache.c | 30 ++++++++++++++++--------------
include/linux/pgtable.h | 8 --------
mm/memory.c | 4 ----
3 files changed, 16 insertions(+), 26 deletions(-)

Upstream: git.kernel.org


  • Share