Re: [PATCH] block: Avoid polling configuration errors
From: Christoph Hellwig
Date: Sat Jun 01 2024 - 03:39:14 EST
On Fri, May 31, 2024 at 05:10:15PM +0800, hexue wrote:
> Here's a misconfigured if application is doing polled IO
> for devices that don't have a poll queue, the process will
> continue to do syscall between user space and kernel space,
> as in normal poll IO, CPU utilization will be 100%. IO actually
> arrives through interruption.
>
> This patch returns a signal that does not support the operation
> when the underlying device does not have a poll queue, avoiding
> performance and CPU simultaneous loss.
This feels like the wrong place to check for this.
As we've dropped synchronous polling we now only support
thead based polling, right now only through io_uring.
So we need to ensure REQ_POLLED doesn't even get set for any
other I/O.