linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Kravetz <mike.kravetz@oracle.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: tsahu@linux.ibm.com, linux-mm@kvack.org
Subject: Re: VM_BUG_ON in  __prep_compound_gigantic_page
Date: Fri, 18 Nov 2022 11:27:27 -0800	[thread overview]
Message-ID: <Y3fcn2JPxbqOPGdH@monkey> (raw)
In-Reply-To: <87r0y0fxwi.fsf@linux.ibm.com>

On 11/18/22 14:21, Aneesh Kumar K.V wrote:
> "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> writes:
> 
> > Hi Mike,
> >
> > With latest upstream I am finding the below:
> >
> > [    0.246646] page dumped because: VM_BUG_ON_PAGE(1 && PageCompound(page))
> > [    0.246671] ------------[ cut here ]------------
> > [    0.246679] kernel BUG at include/linux/page-flags.h:500!
> > cpu 0x6: Vector: 700 (Program Check) at [c00000000fe5b700]
> >     pc: c0000000005e9984: __prep_compound_gigantic_page+0xd4/0x3e0
> >     lr: c0000000005e9980: __prep_compound_gigantic_page+0xd0/0x3e0
> >     sp: c00000000fe5b9a0
> >    msr: 8000000000029033
> >   current = 0xc00000000fdf9880
> >   paca    = 0xc00000001ec7f480   irqmask: 0x03   irq_happened: 0x01
> >     pid   = 1, comm = swapper/0
> > kernel BUG at e)):500!
> > Linux version 6.1.0-rc5-00518-ge0951d75adc4 (kvaneesh@ltczz75-lp2) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #395 SMP Fri Nov 18 00:44:21 CST 2022
> > enter ? for help
> > [c00000000fe5ba60] c000000001bddd74 hugetlb_init+0x60c/0xa10
> > [c00000000fe5bb60] c0000000000121c0 do_one_initcall+0xa0/0x550
> > [c00000000fe5bc40] c000000001b94b90 do_basic_setup+0x1f4/0x254
> > [c00000000fe5bd20] c000000001b94f38 kernel_init_freeable+0x2ac/0x32c
> > [c00000000fe5bda0] c000000000012cf0 kernel_init+0x44/0x184
> > [c00000000fe5be10] c00000000000cdec ret_from_kernel_thread+0x5c/0x64
> > 6:mon> 
> >
> >
> > IIUC that is because we are doing __SetPageHead() before doing
> > __ClearPageReserved(). The original commit that added compound head
> > check in set/clear page reserved did have the change to take care of
> > this.
> >
> 
> Adding the correct commit details
> commit de09d31dd38a ("page-flags: define PG_reserved behavior on compound pages")

Thanks Aneesh!

This was caused by shuffling of code in  my commit 2b21624fc2327 ("hugetlb:
freeze allocated pages before creating hugetlb pages").  My bad for not
running with CONFIG_DEBUG_VM_PGFLAGS.

Will send a fix shortly.
-- 
Mike Kravetz


      reply	other threads:[~2022-11-18 19:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-18  8:50 Aneesh Kumar K.V
2022-11-18  8:51 ` Aneesh Kumar K.V
2022-11-18 19:27   ` Mike Kravetz [this message]

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=Y3fcn2JPxbqOPGdH@monkey \
    --to=mike.kravetz@oracle.com \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=linux-mm@kvack.org \
    --cc=tsahu@linux.ibm.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