您的位置:首页 > 其它

notes on virtio-blk driver

2016-03-28 19:49 344 查看
from block layer perspective

not request_fn based, blk-mq based instead., thus bypassing io scheduler. using one hw queue, so mapping all per-cpu queues into that signle hw queue. requests from generic block layer will first be put on the per-cpu queues and delay work will merge all the
requests from sw queues into the hw queue and send to virtio_queue_rq to process it.

from virtio point of view

one virt queue

a small set of virtio_blk_config

out (ro) and in buffer (writable). in for read, both used for write (order - out,in)

kick doesn't mean flush, because host may still buffer it.

sync part:

submit_bio -> generic_make_request -> blk_mq_make_request -> blk_mq_run_hw_queue -> kblockd_schedule_delayed_work

delayed work:

blk_mq_work_fn -> __blk_mq_run_hw_queue -> virtio_queue_rq
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: