On 11/14/22 15:30, Bart Van Assche wrote:
Certain code in the block layer assumes that requests submitted on a polling queue (HCTX_TYPE_POLL) are completed in thread context. Hence this patch that modifies ufshcd_poll() such that only requests are completed for the hardware queue that is being examined instead of all hardware queues. The block layer code that makes this assumption is the bio caching code. From block/bio.c: If REQ_ALLOC_CACHE is set, the final put of the bio MUST be done from process context, not hard/soft IRQ. The REQ_ALLOC_CACHE flag is set for polled I/O (REQ_POLLED) since kernel v5.15. See also commit be4d234d7aeb ("bio: add allocation cache abstraction").
Please drop this patch - I plan to send an improved version later. Bart.