All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Teng Qin <palmtenor@gmail.com>
Cc: Yu Kuai <yukuai1@huaweicloud.com>,
	linux-block@vger.kernel.org, hch@lst.de, axboe@kernel.dk,
	sagi@grimberg.me, "yukuai (C)" <yukuai3@huawei.com>
Subject: Re: Question on setting IO polling behavior and documentations
Date: Fri, 15 Aug 2025 21:59:21 -0600	[thread overview]
Message-ID: <aKACGfROBeAGixs0@kbusch-mbp> (raw)
In-Reply-To: <CAHumS0Ddg7wj50jvoR1Z9dJrXeizz+=4k7Az0qB_9QH-tAhvQA@mail.gmail.com>

On Thu, Aug 14, 2025 at 06:35:01PM -0400, Teng Qin wrote:
> On Thu, Aug 14, 2025 at 5:31 AM Yu Kuai <yukuai1@huaweicloud.com> wrote:
> >
> > Hi,
> >
> > 在 2025/08/14 13:14, Teng Qin 写道:
> >> Moreover, the block layer documentation at
> >>    Documentation/ABI/stable/sysfs-block
> >> still documents the legacy behavior of the io_poll sysfs file. This is
> >> confusing for users trying to figure out reason of the failed or
> >> unexpected behavior after writing to the file and seeing the dmesg,
> >> particularly because there are many articles on the Internet describing
> >> the legacy behavior.
> >> If the maintainers agree, I can help update these documentations.
> >
> > Feel free to update the documentations, AFAIK, there are some out of
> > date descriptions and it's welcome to fix them
> 
> Thanks a lot for the information. Before writing anything, I just
> want to confirm there is indeed no more per-device control for
> polling behavior? Is io_uring and driver-specific features like
> nvme passthrough the only ways to go right now?
> 
> For users who have legacy applications that could benefit from
> polling but still make traditional IO calls, would it still
> make sense to add a per-device override? I can think of some
> ways of adding a config for a specific device so it would
> tag all bio-s for that device as polling (if queue capable).
> But I'm not sure if that has been discussed before or maybe
> that was intentionally discouraged? Would love to hear from
> the maintainers for opinion.

You can only reach the polling features through io_uring. You can use it
with normal read/write uring commands, or the nvme passthrough uring
commands. Successfully using it requires you have set up your module
parameters to reserve some queues for polling.

The synchronous calls (preadv2/pwritev2) had polling capabilities
removed due to issues. Here's the commit that removed it:

  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9650b453a3d4b1b8ed4ea8bcb9b40109608d1faf

      reply	other threads:[~2025-08-16  3:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-14  5:14 Question on setting IO polling behavior and documentations Teng Qin
2025-08-14  9:31 ` Yu Kuai
2025-08-14 22:35   ` Teng Qin
2025-08-16  3:59     ` Keith Busch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aKACGfROBeAGixs0@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=palmtenor@gmail.com \
    --cc=sagi@grimberg.me \
    --cc=yukuai1@huaweicloud.com \
    --cc=yukuai3@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.