liburing icon indicating copy to clipboard operation
liburing copied to clipboard

[Question] How to implement IORING_SETUP_POLL supported non O_DIRECT (e.g. character device) device?

Open ileixe opened this issue 2 years ago • 0 comments

Hi,

As a very new device vendor (NPU: PCI backed chracter device), we are exploring IO uring APIs to meet our latency/throughput requirements. It seems that iopoll() is not yet used for many device drivers so I wonder how the future road map looks like.

I found NAPI was introduced to support similar requirements here. While reading the patch, I'm not sure how it works in this sense and want to listen what's the road map to introduce iopoll() to other device drivers rather than block driver or file system specific drivers.

To be more specific, here are some questions:

  1. Is there any existent way that I'm not aware of to introduce iopoll() to character device? 1.1. If not, is it completely non-sense to introduce it by any chance?
  2. For network socket, how iopoll() and NAPI poll() are different in iouring perspective? If application set flag 'IORING_SETUP_POLL' for the socket device, is it required to add iopoll() to the device driver?
  3. Currently, the O_DIRECT validation seems be bypassed via creating device inode with a_ops. Is it recommend way to bypass the limitation or just temporary workaround?

I have little background knowledge for kernel APIs so some questions can be answered not directly related to IO uring, so I ask for your forgiveness in advance.

Thanks.

ileixe avatar Jun 30 '22 01:06 ileixe