Skip to content

Commit a07405b

Browse files
jteravestJens Axboe
authored andcommitted
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 <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 316cc67 commit a07405b

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

block/cfq-iosched.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,6 @@ struct cfq_queue {
129129
unsigned long slice_end;
130130
long slice_resid;
131131

132-
/* pending metadata requests */
133-
int meta_pending;
134132
/* number of requests that are on the dispatch list or inside driver */
135133
int dispatched;
136134

@@ -670,9 +668,6 @@ cfq_choose_req(struct cfq_data *cfqd, struct request *rq1, struct request *rq2,
670668
if (rq_is_sync(rq1) != rq_is_sync(rq2))
671669
return rq_is_sync(rq1) ? rq1 : rq2;
672670

673-
if ((rq1->cmd_flags ^ rq2->cmd_flags) & REQ_META)
674-
return rq1->cmd_flags & REQ_META ? rq1 : rq2;
675-
676671
s1 = blk_rq_pos(rq1);
677672
s2 = blk_rq_pos(rq2);
678673

@@ -1593,10 +1588,6 @@ static void cfq_remove_request(struct request *rq)
15931588
cfqq->cfqd->rq_queued--;
15941589
cfq_blkiocg_update_io_remove_stats(&(RQ_CFQG(rq))->blkg,
15951590
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-
}
16001591
}
16011592

16021593
static int cfq_merge(struct request_queue *q, struct request **req,
@@ -3334,13 +3325,6 @@ cfq_should_preempt(struct cfq_data *cfqd, struct cfq_queue *new_cfqq,
33343325
RB_EMPTY_ROOT(&cfqq->sort_list))
33353326
return true;
33363327

3337-
/*
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-
33443328
/*
33453329
* Allow an RT request to pre-empt an ongoing non-RT cfqq timeslice.
33463330
*/
@@ -3405,8 +3389,6 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
34053389
struct cfq_io_context *cic = RQ_CIC(rq);
34063390

34073391
cfqd->rq_queued++;
3408-
if (rq->cmd_flags & REQ_META)
3409-
cfqq->meta_pending++;
34103392

34113393
cfq_update_io_thinktime(cfqd, cic);
34123394
cfq_update_io_seektime(cfqd, cfqq, rq);

0 commit comments

Comments
 (0)