lkml.org 
[lkml]   [2022]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v4 64/66] nommu: Remove uses of VMA linked list
    From
    On 12/1/21 15:30, Liam Howlett wrote:
    > From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
    >
    > Use the maple tree or VMA iterator instead. This is faster and will
    > allow us to shrink the VMA.
    >
    > Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
    > Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>

    Acked-by: Vlastimil Babka <vbabka@suse.cz>

    But I think some fixup needed:

    > @@ -1456,12 +1458,14 @@ void exit_mmap(struct mm_struct *mm)
    >
    > mm->total_vm = 0;
    >
    > - while ((vma = mm->mmap)) {
    > - mm->mmap = vma->vm_next;
    > + mmap_write_lock(mm);

    If locking was missing, should have been added sooner than now?

    > + for_each_vma(vmi, vma) {
    > delete_vma_from_mm(vma);
    > delete_vma(mm, vma);
    > cond_resched();
    > }
    > + __mt_destroy(&mm->mm_mt);

    And this at the point mm_mt was added?

    > + mmap_write_unlock(mm);
    > }
    >
    > int vm_brk(unsigned long addr, unsigned long len)

    \
     
     \ /
      Last update: 2022-01-20 16:06    [W:2.229 / U:0.124 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site