Re: [Bug #13319] Page allocation failures with b43 and p54usb

From: David Rientjes
Date: Tue Jun 30 2009 - 03:47:46 EST


On Tue, 30 Jun 2009, Pekka Enberg wrote:

> > I'd disagree with disabling slub debugging by default for caches where
> > oo_order(s->min) increases as the result of using it.  This particular
> > page allocation failure is happening for, presumably, kmalloc-4096, and
> > the system has 4K pages.  Disabling debugging for that cache (and any of
> > its aliases) implicitly will lead to errors going undiagnosed as a result.
>
> Well, I obviously don't agree here because kmalloc-4096 debugging
> causes problems in the real world.

I don't think CONFIG_SLUB_DEBUG_ON is generally the configuration used in
the real world.

The option has a clear and well-defined purpose and that is to enable
debugging on all slab caches. If you modify its definition, users will
generally ignore the warning about debugging being disabled when "the
minimum possible order at which slab may be allocated is higher than
without." And unless they check the kernel log for such a warning to boot
with `slab_debug=,kmalloc-4096', we lose testing coverage because we
cannot enable redzoning or tracing after boot.

> Furthermore, SLUB never supported
> debugging for objects that big historically because of page allocator
> passthrough. And with Mel Gorman's page allocator optimizations, we
> might be going back to that.
>

Even when page allocation is fast enough, it would still be helpful to
configure slub to not do passthrough purely for the lightweight debugging
opportunities.

> So we should fix SLUB debugging as outlined by Mel Gorman and
> Christoph Lameter. I simply haven't had the time to do it. Patches are
> welcome!
>

You're referring to `slub_debug=A'? I think CONFIG_SLUB_DEBUG_ON should
continue to enable debugging on all slab caches and in instances where it
causes page allocation failures such in Larry's case because
oo_order(s->min) with debugging on is greater than oo_order(s->min) with
debugging off, you can emit a friendly warning in your recently added
slab_out_of_memory() about using `slab_debug=-,<cache>'.

We have a disagreement about which is the default behavior, but I would
opt on the side of adding exemptions to a debug configuration option as
opposed to requiring additional command line parameters to be fully
enabled.