aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Tosatti <marcelo.tosatti@cyclades.com>2005-07-07 17:56:04 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 18:23:35 -0700
commit79b9ce311e192e9a31fd9f3cf1ee4a4edf9e2650 (patch)
tree210896405b2b70aded7582750e20967df8c8e7bf
parentcb2c0233755429037462e16ea0d5497a0092738c (diff)
downloadkernel_samsung_aries-79b9ce311e192e9a31fd9f3cf1ee4a4edf9e2650.zip
kernel_samsung_aries-79b9ce311e192e9a31fd9f3cf1ee4a4edf9e2650.tar.gz
kernel_samsung_aries-79b9ce311e192e9a31fd9f3cf1ee4a4edf9e2650.tar.bz2
[PATCH] print order information when OOM killing
Dump the current allocation order when OOM killing. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/char/sysrq.c2
-rw-r--r--include/linux/swap.h2
-rw-r--r--mm/oom_kill.c4
-rw-r--r--mm/page_alloc.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index af79805..12d563c 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -228,7 +228,7 @@ static struct sysrq_key_op sysrq_term_op = {
static void moom_callback(void *ignored)
{
- out_of_memory(GFP_KERNEL);
+ out_of_memory(GFP_KERNEL, 0);
}
static DECLARE_WORK(moom_work, moom_callback, NULL);
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 2343f99..c75954f 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -148,7 +148,7 @@ struct swap_list_t {
#define vm_swap_full() (nr_swap_pages*2 < total_swap_pages)
/* linux/mm/oom_kill.c */
-extern void out_of_memory(unsigned int __nocast gfp_mask);
+extern void out_of_memory(unsigned int __nocast gfp_mask, int order);
/* linux/mm/memory.c */
extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *);
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 59666d9..e20d559 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -253,12 +253,12 @@ static struct mm_struct *oom_kill_process(struct task_struct *p)
* OR try to be smart about which process to kill. Note that we
* don't have to be perfect here, we just have to be good.
*/
-void out_of_memory(unsigned int __nocast gfp_mask)
+void out_of_memory(unsigned int __nocast gfp_mask, int order)
{
struct mm_struct *mm = NULL;
task_t * p;
- printk("oom-killer: gfp_mask=0x%x\n", gfp_mask);
+ printk("oom-killer: gfp_mask=0x%x, order=%d\n", gfp_mask, order);
/* print memory stats */
show_mem();
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 3c9f7f8..7fbd3ea 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -936,7 +936,7 @@ rebalance:
goto got_pg;
}
- out_of_memory(gfp_mask);
+ out_of_memory(gfp_mask, order);
goto restart;
}