linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V3] block: mark zone-mgmt bios with REQ_SYNC
@ 2020-01-07 21:58 Chaitanya Kulkarni
  2020-01-09  4:42 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Chaitanya Kulkarni @ 2020-01-07 21:58 UTC (permalink / raw)
  To: linux-block; +Cc: axboe, Chaitanya Kulkarni, Damien Le Moal, Bob Liu

In the current implementation, final zone-mgmt request is issued with
submit_bio_wait() which marks the bio REQ_SYNC. This is needed since
immediate action is expected for zone-mgmt requests as these are
blocking operations. This also bypasses the scheduler in the
blk_mq_make_request() and dispatches the request directly into the
hw ctx.

This patch marks all the chained bios REQ_SYNC so that we can have
above-mentioned behavior for non-final bios also.

Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Bob Liu <bob.liu@oracle.com>
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
* Changes from V1 :-
1. Update commit description (Jens).
---
 block/blk-zoned.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index d00fcfd71dfe..05741c6f618b 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -198,7 +198,7 @@ int blkdev_zone_mgmt(struct block_device *bdev, enum req_opf op,
 			break;
 		}
 
-		bio->bi_opf = op;
+		bio->bi_opf = op | REQ_SYNC;
 		bio->bi_iter.bi_sector = sector;
 		sector += zone_sectors;
 
-- 
2.22.1


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

* Re: [PATCH V3] block: mark zone-mgmt bios with REQ_SYNC
  2020-01-07 21:58 [PATCH V3] block: mark zone-mgmt bios with REQ_SYNC Chaitanya Kulkarni
@ 2020-01-09  4:42 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2020-01-09  4:42 UTC (permalink / raw)
  To: Chaitanya Kulkarni, linux-block; +Cc: Damien Le Moal, Bob Liu

On 1/7/20 2:58 PM, Chaitanya Kulkarni wrote:
> In the current implementation, final zone-mgmt request is issued with
> submit_bio_wait() which marks the bio REQ_SYNC. This is needed since
> immediate action is expected for zone-mgmt requests as these are
> blocking operations. This also bypasses the scheduler in the
> blk_mq_make_request() and dispatches the request directly into the
> hw ctx.
> 
> This patch marks all the chained bios REQ_SYNC so that we can have
> above-mentioned behavior for non-final bios also.

Applied, thanks.

-- 
Jens Axboe


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

end of thread, other threads:[~2020-01-09  4:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-07 21:58 [PATCH V3] block: mark zone-mgmt bios with REQ_SYNC Chaitanya Kulkarni
2020-01-09  4:42 ` 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).