From: Vlastimil Babka <vbabka@suse.cz>
To: Yang Shi <yang.shi@linux.alibaba.com>,
mhocko@kernel.org, willy@infradead.org,
ldufour@linux.vnet.ibm.com, kirill@shutemov.name,
akpm@linux-foundation.org, peterz@infradead.org,
mingo@redhat.com, acme@kernel.org,
alexander.shishkin@linux.intel.com, jolsa@redhat.com,
namhyung@kernel.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC v7 PATCH 1/4] mm: refactor do_munmap() to extract the common part
Date: Fri, 10 Aug 2018 12:20:55 +0200 [thread overview]
Message-ID: <e62082b8-d458-0fcb-09ab-463dc45cd049@suse.cz> (raw)
In-Reply-To: <1533857763-43527-2-git-send-email-yang.shi@linux.alibaba.com>
On 08/10/2018 01:36 AM, Yang Shi wrote:
> Introduces three new helper functions:
> * addr_ok()
> * munmap_lookup_vma()
> * munlock_vmas()
>
> They will be used by do_munmap() and the new do_munmap with zapping
> large mapping early in the later patch.
>
> There is no functional change, just code refactor.
>
> Reviewed-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
> Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Small nit below.
> @@ -2764,13 +2812,7 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len,
> */
> if (mm->locked_vm) {
> struct vm_area_struct *tmp = vma;
> - while (tmp && tmp->vm_start < end) {
> - if (tmp->vm_flags & VM_LOCKED) {
> - mm->locked_vm -= vma_pages(tmp);
> - munlock_vma_pages_all(tmp);
> - }
> - tmp = tmp->vm_next;
> - }
> + munlock_vmas(tmp, end);
No need for 'tmp' here.
> }
>
> /*
>
next prev parent reply other threads:[~2018-08-10 10:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-09 23:35 [RFC v7 PATCH 0/4] mm: zap pages with read mmap_sem in munmap for large mapping Yang Shi
2018-08-09 23:36 ` [RFC v7 PATCH 1/4] mm: refactor do_munmap() to extract the common part Yang Shi
2018-08-10 10:20 ` Vlastimil Babka [this message]
2018-08-10 17:41 ` Matthew Wilcox
2018-08-10 18:23 ` Yang Shi
2018-08-09 23:36 ` [RFC v7 PATCH 2/4] mm: mmap: zap pages with read mmap_sem in munmap Yang Shi
2018-08-10 17:57 ` Matthew Wilcox
2018-08-10 18:26 ` Yang Shi
2018-08-09 23:36 ` [RFC v7 PATCH 3/4] uprobes: make vma_has_uprobes non-static Yang Shi
2018-08-09 23:36 ` [RFC v7 PATCH 4/4] mm: unmap special vmas with regular do_munmap() Yang Shi
2018-08-10 9:51 ` Vlastimil Babka
2018-08-10 11:59 ` Michal Hocko
2018-08-10 16:51 ` Yang Shi
2018-08-10 10:46 ` Vlastimil Babka
2018-08-10 17:00 ` Yang Shi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e62082b8-d458-0fcb-09ab-463dc45cd049@suse.cz \
--to=vbabka@suse.cz \
--cc=acme@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=kirill@shutemov.name \
--cc=ldufour@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=willy@infradead.org \
--cc=yang.shi@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).