From: Dave Hansen <dave@linux.vnet.ibm.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] print vmalloc() state after allocation failures
Date: Fri, 08 Apr 2011 06:23:08 -0700 [thread overview]
Message-ID: <1302268988.8184.6890.camel@nimitz> (raw)
In-Reply-To: <20110408001942.GC2874@cmpxchg.org>
On Thu, 2011-04-07 at 17:19 -0700, Johannes Weiner wrote:
> On Thu, Apr 07, 2011 at 10:23:02AM -0700, Dave Hansen wrote:
> > @@ -1579,6 +1579,18 @@ static void *__vmalloc_area_node(struct
> > return area->addr;
> >
> > fail:
> > + if (!(gfp_mask & __GFP_NOWARN) && printk_ratelimit()) {
>
> There is a comment above the declaration of printk_ratelimit:
>
> /*
> * Please don't use printk_ratelimit(), because it shares ratelimiting state
> * with all other unrelated printk_ratelimit() callsites. Instead use
> * printk_ratelimited() or plain old __ratelimit().
> */
>
> I realize that the page allocator does it the same way, but I think it
> should probably be fixed in there, rather than spread any further.
You're the second person to mention this. I should have listened the
first time. :) I'll fix it up and repost.
> > + /*
> > + * We probably did a show_mem() and a stack dump above
> > + * inside of alloc_page*(). This is only so we can
> > + * tell how big the vmalloc() really was. This will
> > + * also not be exactly the same as what was passed
> > + * to vmalloc() due to alignment and the guard page.
> > + */
> > + printk(KERN_WARNING "%s: vmalloc: allocation failure, "
> > + "allocated %ld of %ld bytes\n", current->comm,
> > + (area->nr_pages*PAGE_SIZE), area->size);
> > + }
>
> To me, this does not look like something that should just be appended
> to the whole pile spewed out by dump_stack() and show_mem(). What do
> you think about doing the page allocation with __GFP_NOWARN and have
> the full report come from this place, with the line you introduce as
> leader?
That sounds fine to me.
-- Dave
--
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 internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2011-04-08 13:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-07 17:23 [PATCH] print vmalloc() state after allocation failures Dave Hansen
2011-04-07 22:11 ` David Rientjes
2011-04-08 0:19 ` Johannes Weiner
2011-04-08 13:23 ` Dave Hansen [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=1302268988.8184.6890.camel@nimitz \
--to=dave@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--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).