[dm-devel] [PATCH V3 3/3] dm: support bio polling

2021-06-23 Thread Ming Lei
Support bio(REQ_POLLED) polling in the following approach: 1) only support io polling on normal READ/WRITE, and other abnormal IOs still fallback on IRQ mode, so the target io is exactly inside the dm io. 2) hold one refcnt on io->io_count after submitting this dm bio with REQ_POLLED 3) support

[dm-devel] [PATCH V3 1/3] block: add helper of blk_queue_poll

2021-06-23 Thread Ming Lei
There has been 3 users, and will be more, so add one such helper. Reviewed-by: Chaitanya Kulkarni Reviewed-by: Jeffle Xu Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei --- block/blk-core.c | 5 ++--- block/blk-sysfs.c| 4 ++-- drivers/nvme/host/core.c | 2 +-

[dm-devel] [PATCH V3 2/3] block: add ->poll_bio to block_device_operations

2021-06-23 Thread Ming Lei
Prepare for supporting IO polling for bio based driver. Add ->poll_bio callback so that bio driver can provide their own logic for polling bio. Signed-off-by: Ming Lei --- block/blk-core.c | 13 + block/genhd.c | 2 ++ include/linux/blkdev.h | 1 + 3 files changed,

[dm-devel] [PATCH V3 0/3] block/dm: support bio polling

2021-06-23 Thread Ming Lei
Hello Guys, Based on Christoph's bio based polling model[1], implement DM bio polling with one very simple approach. Patch 1 adds helper of blk_queue_poll(). Patch 2 adds .bio_poll() callback to block_device_operations, so bio driver can implement its own logic for io polling. Patch 3