On Thu, Nov 27, 2025 at 09:14:36AM +0800, Barry Song wrote:
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.
Something I've been wondering about is removing all the "drop the MM
locks while we wait for I/O" gunk. It's a nice amount of code removed:
include/linux/pagemap.h | 8 +---
mm/filemap.c | 98 ++++++++++++-------------------------------------
mm/internal.h | 21 -----------
mm/memory.c | 13 +------
mm/shmem.c | 6 ---
5 files changed, 27 insertions(+), 119 deletions(-)
and I'm not sure we still need to do it with per-VMA locks. What I
have here doesn't boot and I ran out of time to debug it.