From: Andrew Morton <akpm@linux-foundation.org>
To: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: dont call mmu_notifier_invalidate_page during munlock
Date: Wed, 28 May 2014 16:09:48 -0700 [thread overview]
Message-ID: <20140528160948.489fde6e0285885d13f7c656@linux-foundation.org> (raw)
In-Reply-To: <20140528075955.20300.22758.stgit@zurg>
On Wed, 28 May 2014 11:59:55 +0400 Konstantin Khlebnikov <koct9i@gmail.com> wrote:
> try_to_munlock() searches other mlocked vmas, it never unmaps pages.
> There is no reason for invalidation because ptes are left unchanged.
>
> ...
>
> --- a/mm/rmap.c
> +++ b/mm/rmap.c
> @@ -1225,7 +1225,7 @@ int try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
>
> out_unmap:
> pte_unmap_unlock(pte, ptl);
> - if (ret != SWAP_FAIL)
> + if (ret != SWAP_FAIL && TTU_ACTION(flags) != TTU_MUNLOCK)
> mmu_notifier_invalidate_page(mm, address);
> out:
> return ret;
The patch itself looks reasonable but there is no such thing as
try_to_munlock(). I rewrote the changelog thusly:
: In its munmap mode, try_to_unmap_one() searches other mlocked vmas, it
: never unmaps pages. There is no reason for invalidation because ptes are
: left unchanged.
Also, the name try_to_unmap_one() is now pretty inaccurate/incomplete.
Perhaps if someone is feeling enthusiastic they might think up a better
name for the various try_to_unmap functions and see if we can
appropriately document try_to_unmap_one().
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2014-05-28 23:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-28 7:59 Konstantin Khlebnikov
2014-05-28 23:09 ` Andrew Morton [this message]
2014-05-29 7:19 ` Konstantin Khlebnikov
2014-05-29 9:04 ` Andrew Morton
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=20140528160948.489fde6e0285885d13f7c656@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=koct9i@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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