On Fri, Apr 16, 2021 at 04:00:37PM +0800, Jeffle Xu wrote: > Hi, > How about this patch to remove the extra poll_capable() method? > > And the following 'dm: support IO polling for bio-based dm device' needs > following change. > > ``` > + /* > + * Check for request-based device is remained to > + * dm_mq_init_request_queue()->blk_mq_init_allocated_queue(). > + * For bio-based device, only set QUEUE_FLAG_POLL when all underlying > + * devices supporting polling. > + */ > + if (__table_type_bio_based(t->type)) { > + if (dm_table_supports_poll(t)) { > + blk_queue_flag_set(QUEUE_FLAG_POLL_CAP, q); > + blk_queue_flag_set(QUEUE_FLAG_POLL, q); > + } > + else { > + blk_queue_flag_clear(QUEUE_FLAG_POLL, q); > + blk_queue_flag_clear(QUEUE_FLAG_POLL_CAP, q); > + } > + } > ``` Frankly speaking, I don't see any value of using QUEUE_FLAG_POLL_CAP for DM, and the result is basically subset of treating DM as always being capable of polling. Also underlying queue change(either limits or flag) won't be propagated to DM/MD automatically. Strictly speaking it doesn't matter if all underlying queues are capable of supporting polling at the exact time of 'write sysfs/poll', cause any of them may change in future. So why not start with the simplest approach(always capable of polling) which does meet normal bio based polling requirement? Thanks, Ming