All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] further cleanup of vma_merge()
@ 2023-03-21 20:45 Lorenzo Stoakes
  2023-03-21 20:45 ` [PATCH v2 1/4] mm/mmap/vma_merge: further improve prev/next VMA naming Lorenzo Stoakes
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Lorenzo Stoakes @ 2023-03-21 20:45 UTC (permalink / raw)
  To: linux-mm, linux-kernel, Andrew Morton
  Cc: David Hildenbrand, Matthew Wilcox, Vlastimil Babka,
	Liam R . Howlett, maple-tree, Vernon Yang, Lorenzo Stoakes

Following on from Vlastimil Babka's patch series "cleanup vma_merge() and
improve mergeability tests" which was in turn based on Liam's prior
cleanups, this patch series introduces changes discussed in review of
Vlastimil's series and goes further in attempting to make the logic as
clear as possible.

Nearly all of this should have absolutely no functional impact, however it
does add a singular VM_WARN_ON() case.

With many thanks to Vernon for helping kick start the discussion around
simplification - abstract use of vma did indeed turn out not to be
necessary - and to Liam for his excellent suggestions which greatly
simplified things.

v2:
- Put the patch series on a serious diet, cut comments down to avoid
  bloat.
- Added clever use of find_vma_intersection() and vma_lookup() as suggested
  by Liam which improved clarity + brevity significantly.
- Eliminated the use of a temporary vma local as suggested by Vernon, it
  does seem this was ultimately adding confusion and Liam's suggestions
  eliminated the need for this.
- Moved around initial variables to be more sensible and to initialise each
  variable in one place where possible.

v1:
https://lore.kernel.org/all/cover.1679137163.git.lstoakes@gmail.com

Lorenzo Stoakes (4):
  mm/mmap/vma_merge: further improve prev/next VMA naming
  mm/mmap/vma_merge: set next to NULL if not applicable
  mm/mmap/vma_merge: extend invariants, avoid invalid res, vma
  mm/mmap/vma_merge: init cleanup, be explicit about the non-mergeable
    case

 mm/mmap.c | 155 ++++++++++++++++++++++++++++--------------------------
 1 file changed, 80 insertions(+), 75 deletions(-)

--
2.39.2

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-03-23 17:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21 20:45 [PATCH v2 0/4] further cleanup of vma_merge() Lorenzo Stoakes
2023-03-21 20:45 ` [PATCH v2 1/4] mm/mmap/vma_merge: further improve prev/next VMA naming Lorenzo Stoakes
2023-03-21 20:45 ` [PATCH v2 2/4] mm/mmap/vma_merge: set next to NULL if not applicable Lorenzo Stoakes
2023-03-22  1:42   ` Liam R. Howlett
2023-03-22  6:23     ` Lorenzo Stoakes
2023-03-21 20:45 ` [PATCH v2 3/4] mm/mmap/vma_merge: extend invariants, avoid invalid res, vma Lorenzo Stoakes
2023-03-22  9:16   ` Vlastimil Babka
     [not found]   ` <CGME20230323170046eucas1p2483ab0fcc3d6bc56d4b6d09143bbadda@eucas1p2.samsung.com>
2023-03-23 17:00     ` Marek Szyprowski
2023-03-23 17:08       ` Lorenzo Stoakes
2023-03-23 17:10         ` Lorenzo Stoakes
2023-03-21 20:45 ` [PATCH v2 4/4] mm/mmap/vma_merge: init cleanup, be explicit about the non-mergeable case Lorenzo Stoakes
2023-03-22  2:08   ` Liam R. Howlett
2023-03-22  6:07     ` Lorenzo Stoakes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.