diff options
author | Andrea Arcangeli <andrea@suse.de> | 2005-04-16 18:24:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:24:05 -0400 |
commit | 79befd0c08c4766f8fa27e37ac2a70e40840a56a (patch) | |
tree | d0600c289b1a54902e3b78eec0729dc7011569a3 /fs | |
parent | d345734267dbec642f4e34a9d392d2fd85b5fa9b (diff) |
[PATCH] oom-killer disable for iscsi/lvm2/multipath userland critical sections
iscsi/lvm2/multipath needs guaranteed protection from the oom-killer, so
make the magical value of -17 in /proc/<pid>/oom_adj defeat the oom-killer
altogether.
(akpm: we still need to document oom_adj and friends in
Documentation/filesystems/proc.txt!)
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 'fs')
-rw-r--r-- | fs/proc/base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index dad8ea4e00a0..39fd336cfdb9 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -751,7 +751,7 @@ static ssize_t oom_adjust_write(struct file *file, const char __user *buf, | |||
751 | if (copy_from_user(buffer, buf, count)) | 751 | if (copy_from_user(buffer, buf, count)) |
752 | return -EFAULT; | 752 | return -EFAULT; |
753 | oom_adjust = simple_strtol(buffer, &end, 0); | 753 | oom_adjust = simple_strtol(buffer, &end, 0); |
754 | if (oom_adjust < -16 || oom_adjust > 15) | 754 | if ((oom_adjust < -16 || oom_adjust > 15) && oom_adjust != OOM_DISABLE) |
755 | return -EINVAL; | 755 | return -EINVAL; |
756 | if (*end == '\n') | 756 | if (*end == '\n') |
757 | end++; | 757 | end++; |