Skip to contentSkip to conversation

print order information when OOM killing

PATCH New Marcelo Tosatti 1 participant 1 message Jul 3, 2005

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 print order information when OOM killing

Subject says it all.

Description: Dump the current allocation order when OOM killing.

mm/page_alloc.c +1 -1
@@ -819,7 +819,7 @@
 				goto got_pg;
 		}
 
-		out_of_memory(gfp_mask);
+		out_of_memory(gfp_mask, order);
 		goto restart;
 	}
 
mm/oom_kill.c +2 -2
@@ -253,7 +253,7 @@
  * 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(int gfp_mask)
+void out_of_memory(int gfp_mask, int order)
 {
 	struct mm_struct *mm = NULL;
 	task_t * p;
@@ -272,7 +272,7 @@
 		panic("Out of memory and no killable processes...\n");
 	}
 
-	printk("oom-killer: gfp_mask=0x%x\n", gfp_mask);
+	printk("oom-killer: gfp_mask=0x%x order=%d\n", gfp_mask, order);
 	show_free_areas();
 	mm = oom_kill_process(p);
 	if (!mm)
include/linux/swap.h +1 -1
@@ -148,7 +148,7 @@
 #define vm_swap_full() (nr_swap_pages*2 < total_swap_pages)
 
 /* linux/mm/oom_kill.c */
-extern void out_of_memory(int gfp_mask);
+extern void out_of_memory(int gfp_mask, int order);
 
 /* linux/mm/memory.c */
 extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *);

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>