On Tue, 10 Apr 2012, KAMEZAWA Hiroyuki wrote:
> > @@ -3502,13 +3503,24 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
> > pmd, flags);
> > } else {
> > pmd_t orig_pmd = *pmd;
> > + int ret;
> > +
> > barrier();
> > if (pmd_trans_huge(orig_pmd)) {
> > if (flags & FAULT_FLAG_WRITE &&
> > !pmd_write(orig_pmd) &&
> > - !pmd_trans_splitting(orig_pmd))
> > - return do_huge_pmd_wp_page(mm, vma, address,
> > - pmd, orig_pmd);
> > + !pmd_trans_splitting(orig_pmd)) {
> > + ret = do_huge_pmd_wp_page(mm, vma, address, pmd,
> > + orig_pmd);
> > + /*
> > + * If COW results in an oom memcg, the huge pmd
> > + * will already have been split, so retry the
> > + * fault on the pte for a smaller charge.
> > + */
>
>
> IIUC, do_huge_pmd_wp_page_fallback() can return VM_FAULT_OOM. So, this check
> is not related only to memcg.
>
You're right, and if we do that then we infinitely loop trying to handle
the pagefault instead of returning. I'll post a v2 of the patch that
fixes this, thanks for catching it.
--
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>
[Site Home]
[Linux ARM Kernel]
[Linux ARM]
[Linux Omap]
[Fedora ARM]
[IETF Annouce]
[Security]
[Bugtraq]
[Linux]
[Linux OMAP]
[Linux MIPS]
[ECOS]
[Tools]
[DDR & Rambus]
[Asterisk Internet PBX]
[Linux API]
[Monitors]