Skip to content

mmap: Remove do_brk_munmap() optimization

Liam Howlett linux-mm lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mmap: Remove do_brk_munmap() optimizationmm/mmap.c+2 -590 replies
2/3mm/mmap: reorganize munmap to use maple statesinclude/linux/mm.h mm/mmap.c mm/mremap.c+158 -920 replies
3/3mm/mmap: change do_brk_munmap() to usemm/mmap.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] mmap: Remove do_brk_munmap() optimization

Andrew,

The following is a series of changes to remove the do_brk_munmap() optimization that Hugh flagged as an issue. Please apply patch 1 to (mm/mmap: change do_brk_flags() to expand existing VMA and add do_brk_munmap()) and the last two should replace patches in the v11 set.

2/3 should replace 28/69
3/3 should replace 29/69

The end result should look like this:

static int do_brk_munmap(struct ma_state *mas, struct vm_area_struct *vma,
unsigned long newbrk, unsigned long oldbrk, struct list_head *uf)

{       
        struct mm_struct *mm = vma->vm_mm;                                                                          
        int ret;                                                                                                    
        
        arch_unmap(mm, newbrk, oldbrk);
        ret = do_mas_align_munmap(mas, vma, mm, newbrk, oldbrk, uf, true);                                          
        validate_mm_mt(mm);                                                                                         
        return ret;                                                                                                 
}

Thanks,
Liam