]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/mempolicy: use vma iterator & maple state instead of vma linked list
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Wed, 20 Jul 2022 02:18:01 +0000 (02:18 +0000)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 16 Aug 2022 16:00:05 +0000 (12:00 -0400)
commitbdccfbb874085acc48ffd27fcbd3942a6eddc627
tree50c89802bf832879468793ee2fe76ba9b02fc329
parent4f3f701735bf1c1a8820341801f8ec1ff6eb507b
mm/mempolicy: use vma iterator & maple state instead of vma linked list

Reworked the way mbind_range() finds the first VMA to reuse the maple
state and limit the number of tree walks needed.

Note, this drops the VM_BUG_ON(!vma) call, which would catch a start
address higher than the last VMA.  The code was written in a way that
allowed no VMA updates to occur and still return success.  There should be
no functional change to this scenario with the new code.

Link: https://lkml.kernel.org/r/20220504011345.662299-41-Liam.Howlett@oracle.com
Link: https://lkml.kernel.org/r/20220621204632.3370049-57-Liam.Howlett@oracle.com
Link: https://lkml.kernel.org/r/20220720021727.17018-57-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: David Howells <dhowells@redhat.com>
Cc: SeongJae Park <sj@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Will Deacon <will@kernel.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: David Hildenbrand <david@redhat.com>
Cc: Hulk Robot <hulkci@huawei.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mempolicy.c