Commit 038de6b6 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] suppress allocation warnings for radix-tree allocations

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.
parent 5e229c99
......@@ -369,6 +369,7 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0)
#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
......
......@@ -392,8 +392,11 @@ struct page * __alloc_pages(unsigned int gfp_mask, unsigned int order, zonelist_
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;
}
......
......@@ -58,6 +58,7 @@ swap_out_add_to_swap_cache(struct page *page, swp_entry_t entry)
int ret;
current->flags &= ~PF_MEMALLOC;
current->flags |= PF_RADIX_TREE;
ret = add_to_swap_cache(page, entry);
current->flags = flags;
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment