mm-uninline-the-main-body-of-vma_start_write.patch removed from -mm tree
The quilt patch titled
Subject: mm: uninline the main body of vma_start_write()
has been removed from the -mm tree. Its filename was
mm-uninline-the-main-body-of-vma_start_write.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: Suren Baghdasaryan <[email protected]>
Subject: mm: uninline the main body of vma_start_write()
Date: Thu, 13 Feb 2025 14:46:46 -0800
vma_start_write() is used in many places and will grow in size very soon. It is not used in performance critical paths and uninlining it should limit the future code size growth. No functional changes.
---
include/linux/mm.h | 12 +++--------- mm/memory.c | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 9 deletions(-)
include/linux/mm.h renamed from include/linux/mm.h~mm-uninline-the-main-body-of-vma_start_write +3 -9
@@ -787,6 +787,8 @@ static bool __is_vma_write_locked(structreturn (vma->vm_lock_seq == *mm_lock_seq); } +void __vma_start_write (struct vm_area_struct *vma,unsigned int mm_lock_seq); +/* * Begin writing to a VMA. * Exclude concurrent readers under the per-VMA lock until the currently
@@ -799,15 +801,7 @@ static inline void vma_start_write(strucif (__is_vma_write_locked (vma, &mm_lock_seq))return ; -down_write (&vma->vm_lock.lock); -/* -* We should use WRITE_ONCE() here because we can have concurrent reads -* from the early lockless pessimistic check in vma_start_read(). -* We don't really care about the correctness of that early check, but -* we should use WRITE_ONCE() for cleanliness and to keep KCSAN happy. -*/ -WRITE_ONCE (vma->vm_lock_seq, mm_lock_seq); -up_write (&vma->vm_lock.lock); +__vma_start_write (vma, mm_lock_seq); }static inline void vma_assert_write_locked (struct vm_area_struct *vma)
mm/memory.c renamed from mm/memory.c~mm-uninline-the-main-body-of-vma_start_write +14 -0
@@ -6353,6 +6353,20 @@ fail:#endif #ifdef CONFIG_PER_VMA_LOCK +void __vma_start_write (struct vm_area_struct *vma,unsigned int mm_lock_seq) +{ +down_write (&vma->vm_lock.lock); +/* +* We should use WRITE_ONCE() here because we can have concurrent reads +* from the early lockless pessimistic check in vma_start_read(). +* We don't really care about the correctness of that early check, but +* we should use WRITE_ONCE() for cleanliness and to keep KCSAN happy. +*/ +WRITE_ONCE (vma->vm_lock_seq, mm_lock_seq); +up_write (&vma->vm_lock.lock); +} +EXPORT_SYMBOL_GPL (__vma_start_write); +/* * Lookup and lock a VMA under RCU protection. Returned VMA is guaranteed to be * stable and not isolated. If the VMA is not found or is being modified the
_
Patches currently in -mm which might be from [email protected] are