summaryrefslogtreecommitdiff
path: root/src/readahead/readahead-replay.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-01-21 02:51:13 +0100
committerLennart Poettering <lennart@poettering.net>2012-01-21 02:51:13 +0100
commit05aa9edde0f9f4077b8120389c93cb0134eda9c5 (patch)
treeaa56914cf9fca7a2d89cc96e7e7bc1fb04d66b73 /src/readahead/readahead-replay.c
parentaa001cd699a62a5a7a9b8a86c403bfe35fb73aa4 (diff)
readahead: don't monopolize IO when replaying
Diffstat (limited to 'src/readahead/readahead-replay.c')
-rw-r--r--src/readahead/readahead-replay.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/readahead/readahead-replay.c b/src/readahead/readahead-replay.c
index 00d57c3d7a..0c739c82be 100644
--- a/src/readahead/readahead-replay.c
+++ b/src/readahead/readahead-replay.c
@@ -186,7 +186,13 @@ static int replay(const char *root) {
if (on_ssd)
prio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0);
else
- prio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_RT, 7);
+ /* We are not using RT here, since we'd starve IO that
+ we didn't record (which is for example blkid, since
+ its disk accesses go directly to the block device and
+ are thus not visible in fallocate) to death. However,
+ we do ask for an IO prio that is slightly higher than
+ the default (which is BE. 4) */
+ prio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, 2);
if (ioprio_set(IOPRIO_WHO_PROCESS, getpid(), prio) < 0)
log_warning("Failed to set IDLE IO priority class: %m");