linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Miaohe Lin <linmiaohe@huawei.com>
To: Mike Kravetz <mike.kravetz@oracle.com>, <linux-mm@kvack.org>,
	<linux-kernel@vger.kernel.org>
Cc: Muchun Song <songmuchun@bytedance.com>,
	Joao Martins <joao.m.martins@oracle.com>,
	Matthew Wilcox <willy@infradead.org>,
	Michal Hocko <mhocko@suse.com>, Peter Xu <peterx@redhat.com>,
	Oscar Salvador <osalvador@suse.de>,
	Naoya Horiguchi <naoya.horiguchi@nec.com>,
	Vlastimil Babka <vbabka@kernel.org>,
	Sidhartha Kumar <sidhartha.kumar@oracle.com>,
	"Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] hugetlb: Fix __prep_compound_gigantic_page page flag setting
Date: Sat, 19 Nov 2022 10:05:14 +0800	[thread overview]
Message-ID: <5877406c-62bb-8330-e8dc-a5d78c6ab15a@huawei.com> (raw)
In-Reply-To: <20221118195249.178319-1-mike.kravetz@oracle.com>

On 2022/11/19 3:52, Mike Kravetz wrote:
> Commit 2b21624fc232 ("hugetlb: freeze allocated pages before creating
> hugetlb pages") changed the order page flags were cleared and set in the
> head page.  It moved the __ClearPageReserved after __SetPageHead.
> However, there is a check to make sure __ClearPageReserved is never
> done on a head page.  If CONFIG_DEBUG_VM_PGFLAGS is enabled, the
> following BUG will be hit when creating a hugetlb gigantic page:
> 
>     page dumped because: VM_BUG_ON_PAGE(1 && PageCompound(page))
>     ------------[ cut here ]------------
>     kernel BUG at include/linux/page-flags.h:500!
>     Call Trace will differ depending on whether hugetlb page is created
>     at boot time or run time.
> 
> Make sure to __ClearPageReserved BEFORE __SetPageHead.
> 
> Reported-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
> Fixes: 2b21624fc232 ("hugetlb: freeze allocated pages before creating hugetlb pages")
> Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>

Yes, PG_reserved is PF_NO_COMPOUND policy. Thanks for fixing this.

Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>

Thanks,
Miaohe Lin



  reply	other threads:[~2022-11-19  2:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-18 19:52 Mike Kravetz
2022-11-19  2:05 ` Miaohe Lin [this message]
2022-11-19 14:44 ` Tarun Sahu
2022-11-20  4:03 ` Muchun Song

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=5877406c-62bb-8330-e8dc-a5d78c6ab15a@huawei.com \
    --to=linmiaohe@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=joao.m.martins@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=mike.kravetz@oracle.com \
    --cc=naoya.horiguchi@nec.com \
    --cc=osalvador@suse.de \
    --cc=peterx@redhat.com \
    --cc=sidhartha.kumar@oracle.com \
    --cc=songmuchun@bytedance.com \
    --cc=vbabka@kernel.org \
    --cc=willy@infradead.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