On 5/13/26 3:13 AM, Fengnan Chang wrote:
> dm_poll_bio() is the ->poll_bio() callback for a stacked dm device.
> The caller only knows about the dm queue, so it may decide to do a
> spinning poll if it thinks a single queue is being polled. Passing those
> flags unchanged to the mapped clone lets blk_mq_poll() spin on a target
> queue from inside dm_poll_bio().
> 
> With io_uring IOPOLL on a dm-stripe target this can keep a task in
> 
>   dm_poll_bio() -> bio_poll() -> blk_mq_poll()
> 
> long enough to trigger an RCU CPU stall, before io_uring gets back to
> io_iopoll_check() and its need_resched() check.
> 
> Keep dm's ->poll_bio() bounded by forcing one-shot polling for target
> bios. The caller can invoke dm_poll_bio() again if it wants to keep
> polling, and it also gets a chance to reap completions or reschedule
> between passes.

Looks good to me.

-- 
Jens Axboe


Reply via email to