Re: [PATCH] gianfar: reduce stack usage in gianfar_ethtool.c

From: Eric Dumazet
Date: Tue Aug 09 2011 - 14:24:25 EST


Le mardi 09 aoÃt 2011 Ã 11:12 -0700, Joe Perches a Ãcrit :
> On Tue, 2011-08-09 at 19:59 +0200, Eric Dumazet wrote:
> > Le mardi 09 aoÃt 2011 Ã 10:52 -0700, Joe Perches a Ãcrit :
> > > On Tue, 2011-08-09 at 18:53 +0200, Eric Dumazet wrote:
> > > > Le mercredi 10 aoÃt 2011 Ã 00:39 +0800, stufever@xxxxxxxxx a Ãcrit :
> > > []
> > > > > + if (!local_rqfpr || !local_rqfcr) {
> > > > > + pr_err("Out of memory\n");
> > > > Please remove this pr_err(), kmalloc() will complain already.
> > > Always?
> > > I know there's a trace option, but is it always on?
> > Yes, unless caller added ___GFP_NOWARN in gfp :
> > ptr = kmalloc(size, GFP_KERNEL | ___GFP_NOWARN);
>
> Isn't that true only for slub?
>

nope, this is page allocation, so common to slab/slub/...

> Do you know where this get emitted?
> I looked cursorily but I don't see it.
>

This is a bit beyond this thread

Look at mm/page_alloc.c

void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...)



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/