Skip to content

Commit 61f0c1d

Browse files
author
Jens Axboe
committed
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 <[email protected]>
1 parent 963b72f commit 61f0c1d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

block/cfq-iosched.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,12 +1348,13 @@ static int cfq_dispatch_requests(struct request_queue *q, int force)
13481348
/*
13491349
* must wait a bit longer
13501350
*/
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);
13531354
return 0;
13541355
}
13551356

1356-
depth = last_sync / cfq_slice_sync;
1357+
depth = last_sync / cfqd->cfq_slice[1];
13571358
if (depth < max_dispatch)
13581359
max_dispatch = depth;
13591360
}

0 commit comments

Comments
 (0)