diff options
author | Justin TerAvest <teravest@google.com> | 2011-07-10 16:09:19 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2011-07-10 16:09:19 -0400 |
commit | a07405b7802691d29ab3b23bdc76ee6d006aad0b (patch) | |
tree | 8ca155acb56662e9807af2fa91b801b9f0d25495 | |
parent | 316cc67d5e03801a5ee4ac660a4dfe9e02aed475 (diff) |
cfq: Remove special treatment for metadata rqs.
There is no consistency among filesystems from what bios (or requests)
are marked as being metadata. It's interesting to expose this in traces,
but we shouldn't schedule the requests differently based on whether or
not they're marked as being metadata.
Signed-off-by: Justin TerAvest <teravest@google.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
-rw-r--r-- | block/cfq-iosched.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index b2e1c75e4fbe..762bd509b71b 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -129,8 +129,6 @@ struct cfq_queue { | |||
129 | unsigned long slice_end; | 129 | unsigned long slice_end; |
130 | long slice_resid; | 130 | long slice_resid; |
131 | 131 | ||
132 | /* pending metadata requests */ | ||
133 | int meta_pending; | ||
134 | /* number of requests that are on the dispatch list or inside driver */ | 132 | /* number of requests that are on the dispatch list or inside driver */ |
135 | int dispatched; | 133 | int dispatched; |
136 | 134 | ||
@@ -670,9 +668,6 @@ cfq_choose_req(struct cfq_data *cfqd, struct request *rq1, struct request *rq2, | |||
670 | if (rq_is_sync(rq1) != rq_is_sync(rq2)) | 668 | if (rq_is_sync(rq1) != rq_is_sync(rq2)) |
671 | return rq_is_sync(rq1) ? rq1 : rq2; | 669 | return rq_is_sync(rq1) ? rq1 : rq2; |
672 | 670 | ||
673 | if ((rq1->cmd_flags ^ rq2->cmd_flags) & REQ_META) | ||
674 | return rq1->cmd_flags & REQ_META ? rq1 : rq2; | ||
675 | |||
676 | s1 = blk_rq_pos(rq1); | 671 | s1 = blk_rq_pos(rq1); |
677 | s2 = blk_rq_pos(rq2); | 672 | s2 = blk_rq_pos(rq2); |
678 | 673 | ||
@@ -1593,10 +1588,6 @@ static void cfq_remove_request(struct request *rq) | |||
1593 | cfqq->cfqd->rq_queued--; | 1588 | cfqq->cfqd->rq_queued--; |
1594 | cfq_blkiocg_update_io_remove_stats(&(RQ_CFQG(rq))->blkg, | 1589 | cfq_blkiocg_update_io_remove_stats(&(RQ_CFQG(rq))->blkg, |
1595 | rq_data_dir(rq), rq_is_sync(rq)); | 1590 | rq_data_dir(rq), rq_is_sync(rq)); |
1596 | if (rq->cmd_flags & REQ_META) { | ||
1597 | WARN_ON(!cfqq->meta_pending); | ||
1598 | cfqq->meta_pending--; | ||
1599 | } | ||
1600 | } | 1591 | } |
1601 | 1592 | ||
1602 | static int cfq_merge(struct request_queue *q, struct request **req, | 1593 | static int cfq_merge(struct request_queue *q, struct request **req, |
@@ -3335,13 +3326,6 @@ cfq_should_preempt(struct cfq_data *cfqd, struct cfq_queue *new_cfqq, | |||
3335 | return true; | 3326 | return true; |
3336 | 3327 | ||
3337 | /* | 3328 | /* |
3338 | * So both queues are sync. Let the new request get disk time if | ||
3339 | * it's a metadata request and the current queue is doing regular IO. | ||
3340 | */ | ||
3341 | if ((rq->cmd_flags & REQ_META) && !cfqq->meta_pending) | ||
3342 | return true; | ||
3343 | |||
3344 | /* | ||
3345 | * Allow an RT request to pre-empt an ongoing non-RT cfqq timeslice. | 3329 | * Allow an RT request to pre-empt an ongoing non-RT cfqq timeslice. |
3346 | */ | 3330 | */ |
3347 | if (cfq_class_rt(new_cfqq) && !cfq_class_rt(cfqq)) | 3331 | if (cfq_class_rt(new_cfqq) && !cfq_class_rt(cfqq)) |
@@ -3405,8 +3389,6 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, | |||
3405 | struct cfq_io_context *cic = RQ_CIC(rq); | 3389 | struct cfq_io_context *cic = RQ_CIC(rq); |
3406 | 3390 | ||
3407 | cfqd->rq_queued++; | 3391 | cfqd->rq_queued++; |
3408 | if (rq->cmd_flags & REQ_META) | ||
3409 | cfqq->meta_pending++; | ||
3410 | 3392 | ||
3411 | cfq_update_io_thinktime(cfqd, cic); | 3393 | cfq_update_io_thinktime(cfqd, cic); |
3412 | cfq_update_io_seektime(cfqd, cfqq, rq); | 3394 | cfq_update_io_seektime(cfqd, cfqq, rq); |