The recently-added page allocation failure warning generates a lot of
noise due to radix-tree node allocation failures. Those messages are
not interesting.
But I think the warning is otherwise useful - "I got an allocation
failure and then it crashed" is better than "it crashed".
The patch suppresses the message for ratnode allocation failures.
#define PF_MEMDIE 0x00001000 /* Killed for out-of-memory */
#define PF_FREE_PAGES 0x00002000 /* per process page freeing */
#define PF_FLUSHER 0x00004000 /* responsible for disk writeback */
+#define PF_RADIX_TREE 0x00008000 /* debug: performing radix tree alloc */
/*
* Ptrace flags
return page;
}
nopage:
- printk("%s: page allocation failure. order:%d, mode:0x%x\n",
- current->comm, order, gfp_mask);
+ if (!(current->flags & PF_RADIX_TREE)) {
+ printk("%s: page allocation failure."
+ " order:%d, mode:0x%x\n",
+ current->comm, order, gfp_mask);
+ }
return NULL;
}
int ret;
current->flags &= ~PF_MEMALLOC;
+ current->flags |= PF_RADIX_TREE;
ret = add_to_swap_cache(page, entry);
current->flags = flags;
return ret;