Re: [PATCH] slab: prevent warnings when allocating with __GFP_NOWARN

David Rientjes
2013-06-11T22:10:15Z

On Tue, 11 Jun 2013, Christoph Lameter wrote:

> > I think that leaving the warning makes sense to catch similar
> > things which are actually bugs - we had a similar issue with
> > /dev/kmsg (if I remember correctly) which actually pointed to
> > a bug.
>
> Right. Requesting an allocation larger than even supported by the page
> allocator from the slab allocators that are specializing in allocations of
> small objects is usually an indication of a problem in the code.
>

I think we can remove the kmalloc_slab() warning that Sasha is pointing to
and just fallback to the page allocator for sizes that are too large?
Then the page allocator can return NULL and warn, if necessary, for orders
larger than MAX_ORDER.