summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrea Arcangeli <andrea@suse.de>2005-02-01 16:33:26 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-02-01 16:33:26 -0800
commit86a4c6d9e2e43796bb362debd3f73c0e3b198efa (patch)
treeedcd7feaf82617154dc511f0d8d174ccca1df782 /include/linux
parent96fa06f455360ce8855350457a3e599ba41637a7 (diff)
[PATCH] mm: fix several oom killer bugs
Fix several oom killer bugs, most important avoid spurious oom kills badness algorithm tweaked by Thomas Gleixner to deal with fork bombs This is the core of the oom-killer fixes I developed partly taking the idea from Thomas's patches of getting feedback from the exit path, plus I moved the oom killer into page_alloc.c as it should to be able to check the watermarks before killing more stuff. This also tweaks the badness to take thread bombs more into account (that change to badness is from Thomas, from my part I'd rather rewrite badness from scratch instead, but that's an orthgonal issue ;). With this applied the oom killer is very sane, no more 5 sec waits and suprious oom kills. Signed-off-by: Andrea Arcangeli <andrea@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 1fa591147d9f..c34c9671b030 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -615,6 +615,11 @@ struct task_struct {
struct key *thread_keyring; /* keyring private to this thread */
#endif
/*
+ * All archs should support atomic ops with
+ * 1 byte granularity.
+ */
+ unsigned char memdie;
+/*
* Must be changed atomically so it shouldn't be
* be a shareable bitflag.
*/
@@ -736,8 +741,7 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0)
#define PF_DUMPCORE 0x00000200 /* dumped core */
#define PF_SIGNALED 0x00000400 /* killed by a signal */
#define PF_MEMALLOC 0x00000800 /* Allocating memory */
-#define PF_MEMDIE 0x00001000 /* Killed for out-of-memory */
-#define PF_FLUSHER 0x00002000 /* responsible for disk writeback */
+#define PF_FLUSHER 0x00001000 /* responsible for disk writeback */
#define PF_FREEZE 0x00004000 /* this task is being frozen for suspend now */
#define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */