summaryrefslogtreecommitdiff
path: root/src/readahead-collect.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-09-25 14:35:34 +0200
committerLennart Poettering <lennart@poettering.net>2010-09-25 14:35:34 +0200
commit75a010e0b790a2cf3c26408f99927bdb37011a32 (patch)
treee39226973b3433603db3eda7a6154c2eb2f92ef3 /src/readahead-collect.c
parent408b85df83ad5711eeb959dd657b967447892c56 (diff)
readahead: make candidate for early OOM kill
Diffstat (limited to 'src/readahead-collect.c')
-rw-r--r--src/readahead-collect.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/readahead-collect.c b/src/readahead-collect.c
index 6705615d11..47095b1f7c 100644
--- a/src/readahead-collect.c
+++ b/src/readahead-collect.c
@@ -57,7 +57,6 @@
* - read ahead directories
* - sd_readahead_cancel
* - gzip?
- * - oom adjust
* - remount rw
* - are filenames from anotify normalized regards /../ and // and /./?
* - does ioprio_set work with fadvise()?
@@ -216,6 +215,8 @@ static int collect(const char *root) {
assert(root);
+ write_one_line_file("/proc/self/oom_score_adj", "1000");
+
if (ioprio_set(IOPRIO_WHO_PROCESS, getpid(), IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0)) < 0)
log_warning("Failed to set IDLE IO priority class: %m");