git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git]
/
mm
/
oom_kill.c
diff --git
a/mm/oom_kill.c
b/mm/oom_kill.c
index
ed0cee4
..
3de04b6
100644
(file)
--- a/
mm/oom_kill.c
+++ b/
mm/oom_kill.c
@@
-54,6
+54,7
@@
static int badness(struct task_struct *p)
* The memory size of the process is the basis for the badness.
*/
points = p->mm->total_vm;
* The memory size of the process is the basis for the badness.
*/
points = p->mm->total_vm;
+ /* add vserver badness ;) */
/*
* CPU time is in seconds and run time is in minutes. There is no
/*
* CPU time is in seconds and run time is in minutes. There is no
@@
-220,7
+221,7
@@
retry:
/**
* out_of_memory - is the system out of memory?
*/
/**
* 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.
{
/*
* oom_lock protects out_of_memory()'s static variables.
@@
-230,12
+231,6
@@
void out_of_memory(void)
static unsigned long first, last, count, lastkill;
unsigned long now, since;
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;
spin_lock(&oom_lock);
now = jiffies;
since = now - last;
@@
-245,7
+240,6
@@
void out_of_memory(void)
* If it's been a long time since last failure,
* we're not oom.
*/
* If it's been a long time since last failure,
* we're not oom.
*/
- last = now;
if (since > 5*HZ)
goto reset;
if (since > 5*HZ)
goto reset;
@@
-278,6
+272,9
@@
void out_of_memory(void)
*/
lastkill = now;
*/
lastkill = now;
+ printk("oom-killer: gfp_mask=0x%x\n", gfp_mask);
+ show_free_areas();
+
/* oom_kill() sleeps */
spin_unlock(&oom_lock);
oom_kill();
/* oom_kill() sleeps */
spin_unlock(&oom_lock);
oom_kill();