* MMU notifiers and hugepage copy-on-write
@ 2010-03-25 13:26 Dean Roe
0 siblings, 0 replies; only message in thread
From: Dean Roe @ 2010-03-25 13:26 UTC (permalink / raw)
To: linux-mm, aarcange
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>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-25 13:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-25 13:26 MMU notifiers and hugepage copy-on-write Dean Roe
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).