Re: [PATCH] MIPS: make userspace mapping young by default
From: Christophe Leroy <hidden>
Date: 2021-02-08 17:44:30
Also in:
linux-mips, linux-mm
Le 06/02/2021 à 00:41, Andrew Morton a écrit :
On Thu, 4 Feb 2021 16:22:39 +0100 Thomas Bogendoerfer [off-list ref] wrote:quoted
On Thu, Feb 04, 2021 at 09:39:42AM +0800, Huang Pei wrote:quoted
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 Signed-off-by: Huang Pei <redacted> --- arch/mips/mm/cache.c | 30 ++++++++++++++++-------------- include/linux/pgtable.h | 8 -------- mm/memory.c | 3 --- 3 files changed, 16 insertions(+), 25 deletions(-)Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Andrew, can you take this patch through your tree ?Sure. I'll drop Christophe's "mm/memory.c: remove pte_sw_mkyoung()" (https://lkml.kernel.org/r/f302ef92c48d1f08a0459aaee1c568ca11213814.1612345700.git.christophe.leroy@csgroup.eu) in favour of this one.
Pitty. My patch was improving page faults on powerpc/32. That one is only addressing MIPS. Any plan to take the series from Nick https://patchwork.kernel.org/project/linux-mm/list/?series=404539 ? Christophe