mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 14:20:55 +07:00
block: change force plug flush call order
Do blk_flush_plug_list() first and then add new request aDo blk_flush_plug_list() first and then add new request aDo blk_flush_plug_list() first and then add new request at the tail. New request can't be merged to existing requests, but later new requests might be merged with this new one. If blk_flush_plug_list() is done later, the merge doesn't happen. Believe it or not, this fixes a 10% regression running sysbench workload. Signed-off-by: Shaohua Li <shli@kernel.org> Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
This commit is contained in:
parent
e8037d4983
commit
a632716275
@ -1302,11 +1302,11 @@ static int __make_request(struct request_queue *q, struct bio *bio)
|
|||||||
if (__rq->q != q)
|
if (__rq->q != q)
|
||||||
plug->should_sort = 1;
|
plug->should_sort = 1;
|
||||||
}
|
}
|
||||||
list_add_tail(&req->queuelist, &plug->list);
|
|
||||||
plug->count++;
|
|
||||||
drive_stat_acct(req, 1);
|
|
||||||
if (plug->count >= BLK_MAX_REQUEST_COUNT)
|
if (plug->count >= BLK_MAX_REQUEST_COUNT)
|
||||||
blk_flush_plug_list(plug, false);
|
blk_flush_plug_list(plug, false);
|
||||||
|
plug->count++;
|
||||||
|
list_add_tail(&req->queuelist, &plug->list);
|
||||||
|
drive_stat_acct(req, 1);
|
||||||
} else {
|
} else {
|
||||||
spin_lock_irq(q->queue_lock);
|
spin_lock_irq(q->queue_lock);
|
||||||
add_acct_request(q, req, where);
|
add_acct_request(q, req, where);
|
||||||
|
Loading…
Reference in New Issue
Block a user