From: Michal Hocko <mhocko@suse.cz>
To: Rik van Riel <riel@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, Chao Yang <chayang@redhat.com>,
linux-mm@kvack.org, aarcange@redhat.com, mgorman@suse.de,
Veaceslav Falico <vfalico@redhat.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
David Rientjes <rientjes@google.com>,
Michel Lespinasse <walken@google.com>
Subject: Re: [PATCH] mm,numa,THP: initialize hstate for THP page size
Date: Thu, 19 Dec 2013 11:22:31 +0100 [thread overview]
Message-ID: <20131219102231.GE10855@dhcp22.suse.cz> (raw)
In-Reply-To: <52B21FC7.7070905@redhat.com>
[Adding Dave and Mel]
On Wed 18-12-13 17:20:55, Rik van Riel wrote:
> On 12/18/2013 05:08 PM, Andrew Morton wrote:
> >On Wed, 18 Dec 2013 17:03:14 -0500 Rik van Riel <riel@redhat.com> wrote:
> >
> >>When hugetlbfs is started with a non-default page size, it is
> >>possible that no hstate is initialized for the page sized used
> >>by transparent huge pages.
> >>
> >>This causes copy_huge_page to crash on a null pointer. Make
> >>sure we always have an hstate initialized for the page sized
> >>used by THP.
> >>
> >
> >A bit more context is needed here please - so that people can decide
> >which kernel version(s) need patching.
>
> That is a good question.
>
> Looking at the git log, this might go back to 2008,
> when the hugepagesz and default_hugepagesz boot
> options were introduced.
>
> Of course, back then there was no way to use 2MB
> pages together with 1GB pages.
>
> That did not come until transparent huge pages were
> introduced back in 2011. It looks like the transparent
> huge page code avoids the bug (accidentally?) by calling
> copy_user_huge_page when COWing a THP, instead of
> copy_huge_page, this avoids iterating over hstates[].
>
> That means it should not be possible for the bug to
> have been triggered until the numa balancing code
> got merged.
>
copy_huge_page as hugetlb specific thing. It relies on hstate which is
obviously not existing for THP pages. So why do we use it for thp pages
in the first place?
Mel, your "mm: numa: Add THP migration for the NUMA working set scanning
fault case." has added check for PageTransHuge in migrate_page_copy so
it uses the shared copy_huge_page now. Dave has already tried to fix it
by https://lkml.org/lkml/2013/10/28/592 but this one has been dropped
later with "to-be-updated".
Dave do you have an alternative for your patch?
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2013-12-19 10:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 22:03 Rik van Riel
2013-12-18 22:08 ` Andrew Morton
2013-12-18 22:20 ` Rik van Riel
2013-12-19 10:22 ` Michal Hocko [this message]
2013-12-19 15:18 ` Rik van Riel
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=20131219102231.GE10855@dhcp22.suse.cz \
--to=mhocko@suse.cz \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=chayang@redhat.com \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=riel@redhat.com \
--cc=rientjes@google.com \
--cc=vfalico@redhat.com \
--cc=walken@google.com \
/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
all inboxes | Powered by JetHome®