[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <cover.1679468982.git.lstoakes@gmail.com>
Date: Wed, 22 Mar 2023 07:13:00 +0000
From: Lorenzo Stoakes <lstoakes@...il.com>
To: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Cc: David Hildenbrand <david@...hat.com>,
Matthew Wilcox <willy@...radead.org>,
Vlastimil Babka <vbabka@...e.cz>,
"Liam R . Howlett" <Liam.Howlett@...cle.com>,
maple-tree@...ts.infradead.org, Vernon Yang <vernon2gm@...il.com>,
Lorenzo Stoakes <lstoakes@...il.com>
Subject: [PATCH v3 0/4] further cleanup of vma_merge()
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.
v3:
- Combine vma_lookup() cases and reinsert accidentally excluded next = NULL
assignment.
- Reword commit messages to more correctly reflect the current changes.
- Avoid multiple assignment to prev, take vma_start, vma_pgoff assignment
out of the local variable declarations and revert to setting in if (prev)
block.
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.
https://lore.kernel.org/all/cover.1679431180.git.lstoakes@gmail.com
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: fold curr, next assignment logic
mm/mmap/vma_merge: explicitly assign res, vma, extend invariants
mm/mmap/vma_merge: init cleanup, be explicit about the non-mergeable
case
mm/mmap.c | 144 ++++++++++++++++++++++++++++--------------------------
1 file changed, 76 insertions(+), 68 deletions(-)
--
2.39.2
Powered by blists - more mailing lists