Re: page allocation failure. order:0, mode:0x20

From: Arjan van de Ven
Date: Sun Jun 20 2004 - 05:35:11 EST


On Sun, 2004-06-20 at 12:25, Nick Piggin wrote:
> >
> > | # free
> > | total used free shared buffers cached
> > | Mem: 10260 9844 416 0 240 5004
> > | -/+ buffers/cache: 4600 5660
> > | Swap: 33256 3796 29460
> >
>
> Not even atomic allocations memory are allowed to consume all memory.
> A small amount is reserved for memory freeing (which sometimes
> requires initial memory allocations).
>
> The message should be harmless.

Since atomic allocations by definition need to be able to cope with
failure, how about a patch like this to not warn for this common and
legit case?

diff -urNp linux-1130/include/linux/gfp.h
linux-10000/include/linux/gfp.h
--- linux-1130/include/linux/gfp.h
+++ linux-10000/include/linux/gfp.h
@@ -46,7 +46,7 @@ struct vm_area_struct;
__GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \

__GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP)

-#define GFP_ATOMIC (__GFP_HIGH)
+#define GFP_ATOMIC (__GFP_HIGH | __GFP_NOWARN)
#define GFP_NOIO (__GFP_WAIT)
#define GFP_NOFS (__GFP_WAIT | __GFP_IO)
#define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS)

Attachment: signature.asc
Description: This is a digitally signed message part