From: Dean Roe <roe@cray.com>
To: linux-mm@kvack.org, aarcange@redhat.com
Subject: MMU notifiers and hugepage copy-on-write
Date: Thu, 25 Mar 2010 08:26:44 -0500 [thread overview]
Message-ID: <20100325132644.GB20613@cray.com> (raw)
Are MMU notifiers not handling copy-on-write of hugetlb pages?
Looking at the source code, I don't see where this happens.
Non-hugetlb pages are handled via:
do_wp_page() -> set_pte_at_notify() -> mmu_notifier_change_pte()
...but I don't see any MMU notifier callouts down the hugetlb_cow() path,
unless it fails to allocate a new_page():
new_page = alloc_huge_page(vma, address, outside_reserve);
if (IS_ERR(new_page)) {
page_cache_release(old_page);
/*
* If a process owning a MAP_PRIVATE mapping fails to COW,
* it is due to references held by a child and an insufficient
* huge page pool. To guarantee the original mappers
* reliability, unmap the page from child processes. The child
* may get SIGKILLed if it later faults.
*/
if (outside_reserve) {
BUG_ON(huge_pte_none(pte));
>>> if (unmap_ref_private(mm, vma, old_page, address)) {
..where unmap_ref_private() calls __unmap_hugepage_range() which then
calls the MMU notifier invalidate_range functions.
Am I missing something?
Thanks,
Dean
--
Dean Roe
Cray Inc.
roe@cray.com
--
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>
reply other threads:[~2010-03-25 13:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20100325132644.GB20613@cray.com \
--to=roe@cray.com \
--cc=aarcange@redhat.com \
--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;
as well as URLs for NNTP newsgroup(s).