[PATCH 3/3] blk-mq: directly poll requests

Shinichiro Kawasaki shinichiro.kawasaki at wdc.com
Fri Mar 31 00:57:29 PDT 2023


On Mar 21, 2023 / 17:23, Keith Busch wrote:
> From: Keith Busch <kbusch at kernel.org>
> 
> Polling needs a bio with a valid bi_bdev, but neither of those are
> guaranteed for polled driver requests. Make request based polling use
> directly use blk-mq's polling function.
> 
> When executing a request from a polled hctx, we know the request's
> cookie, and that it's from a live multi-queue that supports polling, so
> we can safely skip everything that bio_poll provides.
> 
> Link: http://lists.infradead.org/pipermail/linux-nvme/2023-March/038340.html
> Reported-by: Martin Belanger <Martin.Belanger at dell.com>
> Reported-by: Daniel Wagner <dwagner at suse.de>
> Signed-off-by: Keith Busch <kbusch at kernel.org>

I also tested this patch with rdma and tcp transports using the blktests patches
by Daniel [1]. It fixes the failure, and I did not observe test hangs. Good.

Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki at wdc.com>

I suggest to add the "Cc: stable at kernel.org" tag also. Without this fix patch,
the new blktests test case causes test process hang or test system hang on
stable kernel versions 6.1.0 and 6.2.0. I confirmed the fix patch avoids the
hangs on those stable kernel versions (This patch can not be applied the kernel
to v5.15.105 due to conflicts).

[1] https://lore.kernel.org/linux-block/20230329090202.8351-1-dwagner@suse.de/

-- 
Shin'ichiro Kawasaki


More information about the Linux-nvme mailing list