The quilt patch titled Subject: mm: assert the mmap_lock is held in __anon_vma_prepare() has been removed from the -mm tree. Its filename was mm-assert-the-mmap_lock-is-held-in-__anon_vma_prepare.patch This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: "Matthew Wilcox (Oracle)" <willy@xxxxxxxxxxxxx> Subject: mm: assert the mmap_lock is held in __anon_vma_prepare() Date: Fri, 26 Apr 2024 15:45:00 +0100 Patch series "Improve anon_vma scalability for anon VMAs". We have a 3x throughput improvement reported by Intel's kernel test robot: https://lore.kernel.org/all/202404261055.c5e24608-oliver.sang@xxxxxxxxx/ This is from delaying taking the mmap_lock for page faults until we actually need the mmap_lock in order to assign an anon_vma to the vma. It cleans up the page fault path a little by making the anon fault handler more similar to the file fault handler. This patch (of 4): Convert the comment into an assertion. Link: https://lkml.kernel.org/r/20240426144506.1290619-1-willy@xxxxxxxxxxxxx Link: https://lkml.kernel.org/r/20240426144506.1290619-2-willy@xxxxxxxxxxxxx Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> Reviewed-by: Suren Baghdasaryan <surenb@xxxxxxxxxx> Reviewed-by: David Hildenbrand <david@xxxxxxxxxx> Cc: Jann Horn <jannh@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/rmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/mm/rmap.c~mm-assert-the-mmap_lock-is-held-in-__anon_vma_prepare +++ a/mm/rmap.c @@ -182,8 +182,6 @@ static void anon_vma_chain_link(struct v * for the new allocation. At the same time, we do not want * to do any locking for the common case of already having * an anon_vma. - * - * This must be called with the mmap_lock held for reading. */ int __anon_vma_prepare(struct vm_area_struct *vma) { @@ -191,6 +189,7 @@ int __anon_vma_prepare(struct vm_area_st struct anon_vma *anon_vma, *allocated; struct anon_vma_chain *avc; + mmap_assert_locked(mm); might_sleep(); avc = anon_vma_chain_alloc(GFP_KERNEL); _ Patches currently in -mm which might be from willy@xxxxxxxxxxxxx are squashfs-convert-squashfs_symlink_read_folio-to-use-folio-apis.patch squashfs-remove-calls-to-set-the-folio-error-flag.patch nilfs2-remove-calls-to-folio_set_error-and-folio_clear_error.patch