mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-12 05:48:39 +08:00
block: fix inheriting request priority from bio
In 4.10 I introduced a patch that associates the ioc priority with each request in the block layer. This work was done in the single queue block layer code. This patch unifies ioc priority to request mapping across the single/multi queue block layers. I have tested this patch with the null block device driver with the following parameters. null_blk queue_mode=2 irqmode=0 use_per_node_hctx=1 nr_devices=1 I have not seen a performance regression with this patch and I would appreciate any feedback or additional testing. I have also verified that io priorities are passed to the device when using the SQ and MQ path to a SATA HDD that supports io priorities. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Adam Manzanares <adam.manzanares@wdc.com> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
77f02a7acd
commit
85003a446e
@ -1149,7 +1149,6 @@ static struct request *__get_request(struct request_list *rl, unsigned int op,
|
||||
|
||||
blk_rq_init(q, rq);
|
||||
blk_rq_set_rl(rq, rl);
|
||||
blk_rq_set_prio(rq, ioc);
|
||||
rq->cmd_flags = op;
|
||||
rq->rq_flags = rq_flags;
|
||||
|
||||
@ -1636,6 +1635,7 @@ void init_request_from_bio(struct request *req, struct bio *bio)
|
||||
|
||||
req->errors = 0;
|
||||
req->__sector = bio->bi_iter.bi_sector;
|
||||
blk_rq_set_prio(req, rq_ioc(bio));
|
||||
if (ioprio_valid(bio_prio(bio)))
|
||||
req->ioprio = bio_prio(bio);
|
||||
blk_rq_bio_prep(req->q, req, bio);
|
||||
|
Loading…
Reference in New Issue
Block a user