VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / mm / oom_kill.c
index 4285b59..3de04b6 100644 (file)
@@ -221,7 +221,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.
@@ -231,12 +231,6 @@ void out_of_memory(void)
        static unsigned long first, last, count, lastkill;
        unsigned long now, since;
 
-       /*
-        * Enough swap space left?  Not OOM.
-        */
-       if (nr_swap_pages > 0)
-               return;
-
        spin_lock(&oom_lock);
        now = jiffies;
        since = now - last;
@@ -278,6 +272,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();