From: Andrea Arcangeli <aarcange@redhat.com>
To: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org
Subject: Re: [PATCH mmotm] thp: transparent hugepage core fixlet
Date: Tue, 11 Jan 2011 15:04:21 +0100 [thread overview]
Message-ID: <20110111140421.GM9506@random.random> (raw)
In-Reply-To: <AANLkTin=gzZuDBMdGmR5ZY_9f6kggvt0KJA3XK33-z+2@mail.gmail.com>
On Mon, Jan 10, 2011 at 06:29:29PM -0800, Hugh Dickins wrote:
> On Mon, Jan 10, 2011 at 5:57 PM, Andrea Arcangeli <aarcange@redhat.com> wrote:
> > On Mon, Jan 10, 2011 at 04:55:53PM -0800, Hugh Dickins wrote:
> >> If you configure THP in addition to HUGETLB_PAGE on x86_32 without PAE,
> >> the p?d-folding works out that munlock_vma_pages_range() can crash to
> >> follow_page()'s pud_huge() BUG_ON(flags & FOLL_GET): it needs the same
> >> VM_HUGETLB check already there on the pmd_huge() line. Conveniently,
> >> openSUSE provides a "blogd" which tests this out at startup!
> >
> > How is THP related to this? pud_trans_huge doesn't exist, if pud_huge
> > is true, vma is already guaranteed to belong to hugetlbfs without
> > requiring the additional check.
>
> THP puts in pmds that are huge. In this configuration the "folding" is
> such that the puds are the pmds. So the pud_huge test passes and
> the BUG_ON hits. I hope I've explained that correctly, agreed that
> it's confusing!
>
> >
> > I added the check to pmd_huge already, there it is needed, but for
> > pud_huge it isn't as far as I can tell.
>
> Crashing on that BUG_ON suggests otherwise ;)
I think I see what you mean, pgd=pud=pmd with 2 levels only, but if
pud_huge can return 1 on x86_32 without PAE, that sounds like an
architectural bug to me. Why can't pud_huge simply return 0 for
x86_32? Any other place dealing with hugepages and calling pud_huge on
x86 noPAE would be at risk, otherwise, no?
--
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/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-01-11 14:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-11 0:55 [PATCH mmotm] thp: transparent hugepage core fixlet Hugh Dickins
2011-01-11 1:57 ` Andrea Arcangeli
2011-01-11 2:29 ` Hugh Dickins
2011-01-11 14:04 ` Andrea Arcangeli [this message]
2011-01-11 16:31 ` Andrea Arcangeli
2011-01-11 22:59 ` Hugh Dickins
2011-01-12 2:02 ` Andrea Arcangeli
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=20110111140421.GM9506@random.random \
--to=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.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).