Commit 61f0c1dcaaac71faabac6ef7c839b29f20204bea
1 parent
963b72fc66
Exists in
master
and in
39 other branches
cfq-iosched: use assigned slice sync value, not default
We should use the sysfs modified slice sync value, in case it differs from the default. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Showing 1 changed file with 4 additions and 3 deletions Side-by-side Diff
block/cfq-iosched.c
... | ... | @@ -1348,12 +1348,13 @@ |
1348 | 1348 | /* |
1349 | 1349 | * must wait a bit longer |
1350 | 1350 | */ |
1351 | - if (last_sync < cfq_slice_sync) { | |
1352 | - cfq_schedule_dispatch(cfqd, cfq_slice_sync - last_sync); | |
1351 | + if (last_sync < cfqd->cfq_slice[1]) { | |
1352 | + cfq_schedule_dispatch(cfqd, | |
1353 | + cfqd->cfq_slice[1] - last_sync); | |
1353 | 1354 | return 0; |
1354 | 1355 | } |
1355 | 1356 | |
1356 | - depth = last_sync / cfq_slice_sync; | |
1357 | + depth = last_sync / cfqd->cfq_slice[1]; | |
1357 | 1358 | if (depth < max_dispatch) |
1358 | 1359 | max_dispatch = depth; |
1359 | 1360 | } |