[RFC PATCH 0/2] mm: continue using per-VMA lock when retrying page faults after I/O
Barry Song
21cnbao at gmail.com
Thu Nov 27 12:14:36 AEDT 2025
From: Barry Song <v-songbaohua at oppo.com>
Oven observed most mmap_lock contention and priority inversion
come from page fault retries after waiting for I/O completion.
Oven subsequently raised the following idea:
There is no need to always fall back to mmap_lock if the per-VMA
lock was released only to wait for pagecache or swapcache to
become ready.
In this case, the retry path can continue using the per-VMA lock.
This is a big win: it greatly reduces mmap_lock acquisitions.
Oven Liyang (1):
mm/filemap: Retry fault by VMA lock if the lock was released for I/O
Barry Song (1):
mm/swapin: Retry swapin by VMA lock if the lock was released for I/O
arch/arm/mm/fault.c | 5 +++++
arch/arm64/mm/fault.c | 5 +++++
arch/loongarch/mm/fault.c | 4 ++++
arch/powerpc/mm/fault.c | 5 ++++-
arch/riscv/mm/fault.c | 4 ++++
arch/s390/mm/fault.c | 4 ++++
arch/x86/mm/fault.c | 4 ++++
include/linux/mm_types.h | 9 +++++----
mm/filemap.c | 5 ++++-
mm/memory.c | 10 ++++++++--
10 files changed, 47 insertions(+), 8 deletions(-)
Cc: Russell King <linux at armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas at arm.com>
Cc: Will Deacon <will at kernel.org>
Cc: Huacai Chen <chenhuacai at kernel.org>
Cc: WANG Xuerui <kernel at xen0n.name>
Cc: Madhavan Srinivasan <maddy at linux.ibm.com>
Cc: Michael Ellerman <mpe at ellerman.id.au>
Cc: Nicholas Piggin <npiggin at gmail.com>
Cc: Christophe Leroy <christophe.leroy at csgroup.eu>
Cc: Paul Walmsley <pjw at kernel.org>
Cc: Palmer Dabbelt <palmer at dabbelt.com>
Cc: Albert Ou <aou at eecs.berkeley.edu>
Cc: Alexandre Ghiti <alex at ghiti.fr>
Cc: Alexander Gordeev <agordeev at linux.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer at linux.ibm.com>
Cc: Heiko Carstens <hca at linux.ibm.com>
Cc: Vasily Gorbik <gor at linux.ibm.com>
Cc: Christian Borntraeger <borntraeger at linux.ibm.com>
Cc: Sven Schnelle <svens at linux.ibm.com>
Cc: Dave Hansen <dave.hansen at linux.intel.com>
Cc: Andy Lutomirski <luto at kernel.org>
Cc: Peter Zijlstra <peterz at infradead.org>
Cc: Thomas Gleixner <tglx at linutronix.de>
Cc: Ingo Molnar <mingo at redhat.com>
Cc: Borislav Petkov <bp at alien8.de>
Cc: x86 at kernel.org
Cc: H. Peter Anvin <hpa at zytor.com>
Cc: David Hildenbrand <david at kernel.org>
Cc: Lorenzo Stoakes <lorenzo.stoakes at oracle.com>
Cc: Liam R. Howlett <Liam.Howlett at oracle.com>
Cc: Vlastimil Babka <vbabka at suse.cz>
Cc: Mike Rapoport <rppt at kernel.org>
Cc: Suren Baghdasaryan <surenb at google.com>
Cc: Michal Hocko <mhocko at suse.com>
Cc: Matthew Wilcox <willy at infradead.org>
Cc: Pedro Falcato <pfalcato at suse.de>
Cc: Jarkko Sakkinen <jarkko at kernel.org>
Cc: Oscar Salvador <osalvador at suse.de>
Cc: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
Cc: Oven Liyang <liyangouwen1 at oppo.com>
Cc: Mark Rutland <mark.rutland at arm.com>
Cc: Ada Couprie Diaz <ada.coupriediaz at arm.com>
Cc: Robin Murphy <robin.murphy at arm.com>
Cc: Kristina Martšenko <kristina.martsenko at arm.com>
Cc: Kevin Brodsky <kevin.brodsky at arm.com>
Cc: Yeoreum Yun <yeoreum.yun at arm.com>
Cc: Wentao Guan <guanwentao at uniontech.com>
Cc: Thorsten Blum <thorsten.blum at linux.dev>
Cc: Steven Rostedt <rostedt at goodmis.org>
Cc: Yunhui Cui <cuiyunhui at bytedance.com>
Cc: Nam Cao <namcao at linutronix.de>
Cc: Chris Li <chrisl at kernel.org>
Cc: Kairui Song <kasong at tencent.com>
Cc: Kemeng Shi <shikemeng at huaweicloud.com>
Cc: Nhat Pham <nphamcs at gmail.com>
Cc: Baoquan He <bhe at redhat.com>
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-kernel at vger.kernel.org
Cc: loongarch at lists.linux.dev
Cc: linuxppc-dev at lists.ozlabs.org
Cc: linux-riscv at lists.infradead.org
Cc: linux-s390 at vger.kernel.org
Cc: linux-mm at kvack.org
Cc: linux-fsdevel at vger.kernel.org
--
2.39.3 (Apple Git-146)
More information about the Linuxppc-dev
mailing list