]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] print order information when OOM killing
authorMarcelo Tosatti <marcelo.tosatti@cyclades.com>
Fri, 8 Jul 2005 00:56:04 +0000 (17:56 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 8 Jul 2005 01:23:35 +0000 (18:23 -0700)
Dump the current allocation order when OOM killing.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/sysrq.c
include/linux/swap.h
mm/oom_kill.c
mm/page_alloc.c

index af79805b5576f4b08ca02b357cd4f3fb96d23ec6..12d563c648f7377ce640bff741aa782c756c1051 100644 (file)
@@ -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);
index 2343f999e6e11e287fa20532608d81796c3b58db..c75954f2d868213a2abbac0a9f3d8ddef3fb2fbb 100644 (file)
@@ -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 *);
index 59666d905f1997521c89f4a7b1a492df4414be0e..e20d559edbaf5f48bed72b20ceda0422c63befb5 100644 (file)
@@ -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();
 
index 3c9f7f88112543d2e72021c576cc377a2244e295..7fbd3ea8765c6bd109d9e9d51836c8a88aabdb40 100644 (file)
@@ -936,7 +936,7 @@ rebalance:
                                goto got_pg;
                }
 
-               out_of_memory(gfp_mask);
+               out_of_memory(gfp_mask, order);
                goto restart;
        }