summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-04-20 00:28:52 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-04-20 00:28:52 -0700
commitcca095e03401e4a1c6cd1a747d8e278986b9d6a4 (patch)
tree2b0b8b3acd2dc8cca09ec693eea3c2e354a2c78f /include/linux
parent6bf11a468c63a09911e5c6bb02ad980684923c81 (diff)
[PATCH] oom-kill: preferentially kill swapoff
From: Hugh Dickins <hugh@veritas.com> The current behaviour is that once swapoff has filled memory, other tasks get OOMkilled one by one until swapoff completes, or more likely hangs. It is better that swapoff be the first choice for OOMkill. The patch changes the oom-killer so that it will kill off any currently-running swapoff instance before killing any other task. (Bit kludgy, couldn't think of a better way)
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index c30c44f3cfcc..eee58c7354b4 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -465,6 +465,7 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0)
#define PF_FROZEN 0x00010000 /* frozen for system suspend */
#define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */
#define PF_KSWAPD 0x00040000 /* I am kswapd */
+#define PF_SWAPOFF 0x00080000 /* I am in swapoff */
#if CONFIG_SMP
extern void set_cpus_allowed(task_t *p, unsigned long new_mask);