Skip to content

Commit

Permalink
blkio: Wait on sync-noidle queue even if rq_noidle = 1
Browse files Browse the repository at this point in the history
o rq_noidle() is supposed to tell cfq that do not expect a request after this
  one, hence don't idle. But this does not seem to work very well. For example
  for direct random readers, rq_noidle = 1 but there is next request coming
  after this. Not idling, leads to a group not getting its share even if
  group_isolation=1.

o The right solution for this issue is to scan the higher layers and set
  right flag (WRITE_SYNC or WRITE_ODIRECT). For the time being, this single
  line fix helps. This should not have any significant impact when we are
  not using cgroups. I will later figure out IO paths in higher layer and
  fix it.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Vivek Goyal authored and Jens Axboe committed Dec 3, 2009
1 parent ae30c28 commit c04645e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -3314,7 +3314,8 @@ static void cfq_completed_request(struct request_queue *q, struct request *rq)
* only if we processed at least one !rq_noidle request
*/
if (cfqd->serving_type == SYNC_WORKLOAD
|| cfqd->noidle_tree_requires_idle)
|| cfqd->noidle_tree_requires_idle
|| cfqq->cfqg->nr_cfqq == 1)
cfq_arm_slice_timer(cfqd);
}
}
Expand Down

0 comments on commit c04645e

Please sign in to comment.