On 8/14/22 10:13, Damien Le Moal wrote:
And writes to zoned drives never get plugged in the first place, scheduler
present or not.
Hi Damien,
I agree that blk_mq_submit_bio() does not plug writes to zoned drives
because of the following code in blk_mq_plug():
/* Zoned block device write operation case: do not plug the BIO */
if (bdev_is_zoned(bio->bi_bdev) && op_is_write(bio_op(bio)))
return NULL;
However, I have not found any code in blk_execute_rq_nowait() that
causes the plugging mechanism to be skipped for zoned writes. Did I
perhaps overlook something? The current blk_execute_rq_nowait()
implementation is as follows:
void blk_execute_rq_nowait(struct request *rq, bool at_head)
{
WARN_ON(irqs_disabled());
WARN_ON(!blk_rq_is_passthrough(rq));
blk_account_io_start(rq);
if (current->plug)
blk_add_rq_to_plug(current->plug, rq);
else
blk_mq_sched_insert_request(rq, at_head, true, false);
}
Thanks,
Bart.