chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6de338a
)
units: use OOMScoreAdjust= in the unit files to set OOM score adjust
author
Lennart Poettering
<lennart@poettering.net>
Thu, 3 May 2012 22:15:21 +0000
(
00:15
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 3 May 2012 22:15:21 +0000
(
00:15
+0200)
src/readahead/readahead-collect.c
patch
|
blob
|
history
src/readahead/readahead-replay.c
patch
|
blob
|
history
units/systemd-readahead-collect.service.in
patch
|
blob
|
history
units/systemd-readahead-replay.service.in
patch
|
blob
|
history
diff --git
a/src/readahead/readahead-collect.c
b/src/readahead/readahead-collect.c
index 70e0f66eda2b51d5a523796536fcadd34ebfc19e..a88e7f2d70f2e1a1d2733bf8e53872ad6b2b8b61 100644
(file)
--- a/
src/readahead/readahead-collect.c
+++ b/
src/readahead/readahead-collect.c
@@
-253,8
+253,6
@@
static int collect(const char *root) {
block_get_readahead(root, &previous_block_readahead) >= 0 &&
block_set_readahead(root, 8*1024) >= 0;
block_get_readahead(root, &previous_block_readahead) >= 0 &&
block_set_readahead(root, 8*1024) >= 0;
- 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");
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");
diff --git
a/src/readahead/readahead-replay.c
b/src/readahead/readahead-replay.c
index 0b7e6df946aab24b7311b3de133bf601049cc730..a6529f8bace696c8a01393dcfafe7e62a9b71ebf 100644
(file)
--- a/
src/readahead/readahead-replay.c
+++ b/
src/readahead/readahead-replay.c
@@
-132,7
+132,6
@@
static int replay(const char *root) {
assert(root);
assert(root);
- write_one_line_file("/proc/self/oom_score_adj", "1000");
block_bump_request_nr(root);
if (asprintf(&pack_fn, "%s/.readahead", root) < 0) {
block_bump_request_nr(root);
if (asprintf(&pack_fn, "%s/.readahead", root) < 0) {
diff --git
a/units/systemd-readahead-collect.service.in
b/units/systemd-readahead-collect.service.in
index c5e1d5274f84c2d3b760aadb183a1479a2c836b8..887339c3f315155896ff9e2b8438d4a437293c01 100644
(file)
--- a/
units/systemd-readahead-collect.service.in
+++ b/
units/systemd-readahead-collect.service.in
@@
-18,6
+18,7
@@
Type=notify
ExecStart=@rootlibexecdir@/systemd-readahead-collect
RemainAfterExit=yes
StandardOutput=null
ExecStart=@rootlibexecdir@/systemd-readahead-collect
RemainAfterExit=yes
StandardOutput=null
+OOMScoreAdjust=1000
[Install]
WantedBy=default.target
[Install]
WantedBy=default.target
diff --git
a/units/systemd-readahead-replay.service.in
b/units/systemd-readahead-replay.service.in
index 7387ebac085df8a89d96390456f96f77eecda072..6a101678c308fe0c38a2f642ff976393e5299131 100644
(file)
--- a/
units/systemd-readahead-replay.service.in
+++ b/
units/systemd-readahead-replay.service.in
@@
-18,6
+18,7
@@
Type=notify
ExecStart=@rootlibexecdir@/systemd-readahead-replay
RemainAfterExit=yes
StandardOutput=null
ExecStart=@rootlibexecdir@/systemd-readahead-replay
RemainAfterExit=yes
StandardOutput=null
+OOMScoreAdjust=1000
[Install]
WantedBy=default.target
[Install]
WantedBy=default.target