Ah, you're right. This individual patch looks good to me.
Brian
On Mon, Dec 28, 2020 at 11:12 AM Dmitry Safonov wrote:
>
> On 12/28/20 6:21 PM, Brian Geffon wrote:
> > This looks good to me with a small comment.
> >
> >> if (do_munmap(mm, old_addr, old_len, uf_unmap) < 0) {
> >>
On 12/28/20 6:21 PM, Brian Geffon wrote:
> This looks good to me with a small comment.
>
>> if (do_munmap(mm, old_addr, old_len, uf_unmap) < 0) {
>> /* OOM: unable to split vma, just get accounts right */
>> - if (vm_flags & VM_ACCOUNT)
>> + if (
This looks good to me with a small comment.
> if (do_munmap(mm, old_addr, old_len, uf_unmap) < 0) {
> /* OOM: unable to split vma, just get accounts right */
> - if (vm_flags & VM_ACCOUNT)
> + if (vm_flags & VM_ACCOUNT && !(flags & MREMAP_DONTUNM
Currently memory is accounted post-mremap() with MREMAP_DONTUNMAP, which
may break overcommit policy. So, check if there's enough memory before
doing actual VMA copy.
Don't unset VM_ACCOUNT on MREMAP_DONTUNMAP. By semantics, such mremap()
is actually a memory allocation. That also simplifies the e
4 matches
Mail list logo