aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-08-01 20:11:57 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-01 20:11:57 -0700
commit5d87f5bda829d445021911e8fd526b113261f85e (patch)
treef1e6d7db7ebbdd05fef912e51df3ab83559fd6a2 /mm
parent0e31581388fe87a240b849c9a21c32e8cddce9f5 (diff)
downloadhistory-5d87f5bda829d445021911e8fd526b113261f85e.tar.gz
[PATCH] oom-killer: call show_free_areas
Change the oom-killer so that it spits a sysrq-m output into the logs, and shows the gfp_mask of the failing allocation attempt. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/oom_kill.c5
-rw-r--r--mm/vmscan.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index a902e51315a7ec..9bcd259f0bc474 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -220,7 +220,7 @@ retry:
/**
* out_of_memory - is the system out of memory?
*/
-void out_of_memory(void)
+void out_of_memory(int gfp_mask)
{
/*
* oom_lock protects out_of_memory()'s static variables.
@@ -271,6 +271,9 @@ void out_of_memory(void)
*/
lastkill = now;
+ printk("oom-killer: gfp_mask=0x%x\n", gfp_mask);
+ show_free_areas();
+
/* oom_kill() sleeps */
spin_unlock(&oom_lock);
oom_kill();
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 9aedd8e48c8812..8e3b69342a8dbf 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -949,7 +949,7 @@ int try_to_free_pages(struct zone **zones,
blk_congestion_wait(WRITE, HZ/10);
}
if ((gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY))
- out_of_memory();
+ out_of_memory(gfp_mask);
out:
for (i = 0; zones[i] != 0; i++)
zones[i]->prev_priority = zones[i]->temp_priority;