From: Yang Shi <yang.shi@linux.alibaba.com>
To: mhocko@kernel.org, willy@infradead.org,
ldufour@linux.vnet.ibm.com, kirill@shutemov.name, vbabka@suse.cz,
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: yang.shi@linux.alibaba.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: [RFC v8 PATCH 4/5] mm: unmap VM_HUGETLB mappings with optimized path
Date: Thu, 16 Aug 2018 02:49:49 +0800 [thread overview]
Message-ID: <1534358990-85530-5-git-send-email-yang.shi@linux.alibaba.com> (raw)
In-Reply-To: <1534358990-85530-1-git-send-email-yang.shi@linux.alibaba.com>
When unmapping VM_HUGETLB mappings, vm flags need to be updated. Since
the vmas have been detached, so it sounds safe to update vm flags with
read mmap_sem.
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>
---
mm/mmap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mm/mmap.c b/mm/mmap.c
index e92f680..3b9f734 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2812,7 +2812,6 @@ static int do_munmap_zap_rlock(struct mm_struct *mm, unsigned long start,
/*
* Unmapping vmas, which have:
- * VM_HUGETLB or
* VM_PFNMAP or
* uprobes
* need get done with write mmap_sem held since they may update
@@ -2821,7 +2820,7 @@ static int do_munmap_zap_rlock(struct mm_struct *mm, unsigned long start,
for (vma = start_vma; vma && vma->vm_start < end; vma = vma->vm_next) {
if ((vma->vm_file &&
has_uprobes(vma, vma->vm_start, vma->vm_end)) ||
- (vma->vm_flags & (VM_HUGETLB | VM_PFNMAP)))
+ (vma->vm_flags & VM_PFNMAP))
goto regular_path;
}
--
1.8.3.1
next prev parent reply other threads:[~2018-08-15 18:50 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-15 18:49 [RFC v8 PATCH 0/5] mm: zap pages with read mmap_sem in munmap for large mapping Yang Shi
2018-08-15 18:49 ` [RFC v8 PATCH 1/5] mm: refactor do_munmap() to extract the common part Yang Shi
2018-08-15 18:49 ` [RFC v8 PATCH 2/5] uprobes: introduce has_uprobes helper Yang Shi
2018-08-22 10:55 ` Vlastimil Babka
2018-08-22 15:07 ` Srikar Dronamraju
2018-08-22 20:51 ` Yang Shi
2018-08-23 15:15 ` Oleg Nesterov
2018-08-23 16:07 ` Yang Shi
2018-08-15 18:49 ` [RFC v8 PATCH 3/5] mm: mmap: zap pages with read mmap_sem in munmap Yang Shi
2018-08-15 19:16 ` Matthew Wilcox
2018-08-15 21:09 ` Matthew Wilcox
2018-08-15 21:54 ` Yang Shi
2018-08-16 2:46 ` Matthew Wilcox
2018-08-16 6:11 ` Yang Shi
2018-08-22 11:11 ` Vlastimil Babka
2018-08-22 19:20 ` Yang Shi
2018-08-22 11:19 ` Vlastimil Babka
2018-08-22 20:45 ` Yang Shi
2018-08-22 21:10 ` Kirill A. Shutemov
2018-08-22 21:42 ` Dave Hansen
2018-08-22 21:56 ` Yang Shi
2018-08-22 22:03 ` Dave Hansen
2018-08-15 18:49 ` Yang Shi [this message]
2018-08-15 18:49 ` [RFC v8 PATCH 5/5] mm: unmap VM_PFNMAP mappings with optimized path 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=1534358990-85530-5-git-send-email-yang.shi@linux.alibaba.com \
--to=yang.shi@linux.alibaba.com \
--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=vbabka@suse.cz \
--cc=willy@infradead.org \
/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).