public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
	io-uring@vger.kernel.org
Subject: Re: [PATCH] /dev/mem: nowait zero/null ops
Date: Wed, 8 Sep 2021 11:54:53 +0100	[thread overview]
Message-ID: <b03a27cd-1e5a-9444-c406-e15c52d2a066@gmail.com> (raw)
In-Reply-To: <YTiPoKc9GiG52DNd@kroah.com>

On 9/8/21 11:25 AM, Greg Kroah-Hartman wrote:
> On Wed, Sep 08, 2021 at 11:06:51AM +0100, Pavel Begunkov wrote:
>> Make read_iter_zero() to honor IOCB_NOWAIT, so /dev/zero can be
>> advertised as FMODE_NOWAIT. This helps subsystems like io_uring to use
>> it more effectively. Set FMODE_NOWAIT for /dev/null as well, it never
>> waits and therefore trivially meets the criteria.
> 
> I do not understand, why would io_uring need to use /dev/zero

Not directly, users can issue I/O against it via io_uring.
 
> and how is this going to help anything?

For files not supporting nowait io_uring goes through a quite slow path.

> What workload does this help with?

Personally for me it's dumping output and benchmarking (not benchmarking
/dev/zero, of course). But I'd also expect any tool that may be using
it but rewritten with io_uring being able to normally use it without a
performance hit.

-- 
Pavel Begunkov

  reply	other threads:[~2021-09-08 10:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 10:06 [PATCH] /dev/mem: nowait zero/null ops Pavel Begunkov
2021-09-08 10:25 ` Greg Kroah-Hartman
2021-09-08 10:54   ` Pavel Begunkov [this message]
2021-09-08 12:57 ` Jens Axboe
2021-09-08 13:07   ` Pavel Begunkov
2021-09-08 13:53     ` Jens Axboe

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=b03a27cd-1e5a-9444-c406-e15c52d2a066@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=arnd@arndb.de \
    --cc=axboe@kernel.dk \
    --cc=gregkh@linuxfoundation.org \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox