linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Block SQ/MQ Request Priority
@ 2017-04-04 15:25 adam.manzanares
  2017-04-04 15:31 ` Bart Van Assche
  2017-04-04 21:40 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: adam.manzanares @ 2017-04-04 15:25 UTC (permalink / raw)
  To: axboe, linux-block, linux-kernel; +Cc: hch, Bart.VanAssche, Adam Manzanares

From: Adam Manzanares <adam.manzanares@wdc.com>

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.

Thanks.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Adam Manzanares <adam.manzanares@wdc.com>
---
 block/blk-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index 43b7d06..316a539 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -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);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Block SQ/MQ Request Priority
  2017-04-04 15:25 [PATCH] Block SQ/MQ Request Priority adam.manzanares
@ 2017-04-04 15:31 ` Bart Van Assche
  2017-04-04 21:40 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Bart Van Assche @ 2017-04-04 15:31 UTC (permalink / raw)
  To: Adam Manzanares, linux-kernel, linux-block, axboe; +Cc: hch

On Tue, 2017-04-04 at 08:25 -0700, adam.manzanares@wdc.com wrote:
> 

Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Block SQ/MQ Request Priority
  2017-04-04 15:25 [PATCH] Block SQ/MQ Request Priority adam.manzanares
  2017-04-04 15:31 ` Bart Van Assche
@ 2017-04-04 21:40 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2017-04-04 21:40 UTC (permalink / raw)
  To: adam.manzanares, linux-block, linux-kernel; +Cc: hch, Bart.VanAssche

On 04/04/2017 09:25 AM, adam.manzanares@wdc.com wrote:
> From: Adam Manzanares <adam.manzanares@wdc.com>
> 
> 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.

Applied, with an updated subject line, it didn't really describe what
the patch does. Thanks.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-04 21:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-04 15:25 [PATCH] Block SQ/MQ Request Priority adam.manzanares
2017-04-04 15:31 ` Bart Van Assche
2017-04-04 21:40 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).