linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Frans Pop <elendil@planet.nl>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
	Paul Mackerras <paulus@samba.org>,
	Sean MacLennan <smaclennan@pikatech.com>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: Badness on the Warp
Date: Sun, 21 Jun 2009 13:20:56 +0300	[thread overview]
Message-ID: <84144f020906210320n2984807dw2d4b4fb38afd22cf@mail.gmail.com> (raw)
In-Reply-To: <200906210628.35553.elendil@planet.nl>

On Sun, Jun 21, 2009 at 7:28 AM, Frans Pop<elendil@planet.nl> wrote:
> On Sunday 21 June 2009, Sean MacLennan wrote:
>> I found the source of the badness. The backtrace is correct:
>>
>> uic_init_one
>
> So that's in arch/powerpc/sysdev/uic.c.
>
>> ___alloc_bootmem
>> ___alloc_bootmem_nopanic
>> alloc_arch_preferred_bootmem
>>
>> In alloc_arch_preferred_bootmem we have:
>>
>> =A0 =A0 =A0 if (WARN_ON_ONCE(slab_is_available()))
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 return kzalloc(size, GFP_NOWAIT);
>>
>> Since the slab is available (it had better be or the call will return
>> NULL), we get the badness message, then a successful return from
>> kzalloc.
>>
>> I believe the author wants something like:
>>
>> =A0 =A0 =A0 if (slab_is_available())
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 return kzalloc(size, GFP_NOWAIT);
>> =A0 =A0 =A0 else
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 WARN_ON_ONCE(1);
>
> Well, I myself have no idea. It could also indicate a bug in the uic code=
.
>
> But let's CC some people responsible for this code. Pekka recently added
> this WARN that triggers in your case; David and Paul look to be the
> people most involved in the uic code.
>
> Start of the thread is at http://lkml.org/lkml/2009/6/20/165.

The WARN_ON() is there to let us know that someone is doing a bootmem
allocation but the slab allocator is already up. So the proper fix
here is to use kmalloc() directly in the call-site that triggers this
WARN_ON. I'm cc'ing Ben as he has been taking care of the fall-out
from my patches on ppc.

                                  Pekka

  reply	other threads:[~2009-06-21 10:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-20 19:48 Badness on the Warp Sean MacLennan
2009-06-20 20:56 ` Frans Pop
2009-06-20 23:10   ` Sean MacLennan
2009-06-20 23:26     ` Frans Pop
2009-06-21  4:08       ` Daniel Barkalow
2009-06-20 23:42   ` Sean MacLennan
2009-06-21  4:28     ` Frans Pop
2009-06-21 10:20       ` Pekka Enberg [this message]
2009-06-21 22:25         ` Benjamin Herrenschmidt
2009-06-21 22:36           ` Sean MacLennan
2009-06-21 22:57             ` Benjamin Herrenschmidt
2009-06-22  4:48             ` Pekka Enberg
2009-06-23  5:24           ` Sean MacLennan
2009-06-21  7:03   ` H. Peter Anvin

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=84144f020906210320n2984807dw2d4b4fb38afd22cf@mail.gmail.com \
    --to=penberg@cs.helsinki.fi \
    --cc=david@gibson.dropbear.id.au \
    --cc=elendil@planet.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=smaclennan@pikatech.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;
as well as URLs for NNTP newsgroup(s).