On Mon, 23 Apr 2012, David Rientjes wrote: > > Can you instead put a __split_huge_page_pmd(mm, pmd) here? It has to > > redo the get-page-ref-through-pagetable dance, but it's more robust > > and obvious than splitting the COW page before returning OOM in the > > thp wp handler. > > > > I agree it's more robust if do_huge_pmd_wp_page() were modified later and > mistakenly returned VM_FAULT_OOM without the page being split, but > __split_huge_page_pmd() has the drawback of also requiring to retake > mm->page_table_lock to test whether orig_pmd is still legitimate so it > will be slower. Do you feel strongly about the way it's currently written > which will be faster at runtime? > Andrew, please merge this patch. I'd rather not unnecessarily take another reference on the cow page and unnecessarily take mm->page_table_lock in the page fault handler so the code is cleaner. It's faster this way. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>