From: Avi Kivity <avi@scylladb.com>
To: Goldwyn Rodrigues <rgoldwyn@suse.de>, jack@suse.com
Cc: hch@infradead.org, linux-fsdevel@vger.kernel.org,
linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org,
linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 0/8 v2] Non-blocking AIO
Date: Sun, 5 Mar 2017 16:56:21 +0200 [thread overview]
Message-ID: <347d19cb-dbb8-1d4f-dfb5-d1dd820dd65d@scylladb.com> (raw)
In-Reply-To: <20170228233610.25456-1-rgoldwyn@suse.de>
On 03/01/2017 01:36 AM, Goldwyn Rodrigues wrote:
> This series adds nonblocking feature to asynchronous I/O writes.
> io_submit() can be delayed because of a number of reason:
> - Block allocation for files
> - Data writebacks for direct I/O
> - Sleeping because of waiting to acquire i_rwsem
> - Congested block device
We've been hit by a few of these so this change is very welcome.
>
> The goal of the patch series is to return -EAGAIN/-EWOULDBLOCK if
> any of these conditions are met. This way userspace can push most
> of the write()s to the kernel to the best of its ability to complete
> and if it returns -EAGAIN, can defer it to another thread.
>
Is it not possible to push the iocb to a workqueue? This will allow
existing userspace to work with the new functionality, unchanged. Any
userspace implementation would have to do the same thing, so it's not
like we're saving anything by pushing it there.
> In order to enable this, IOCB_FLAG_NOWAIT is introduced in
> uapi/linux/aio_abi.h which translates to IOCB_NOWAIT for struct iocb,
> BIO_NOWAIT for bio and IOMAP_NOWAIT for iomap.
>
> This feature is provided for direct I/O of asynchronous I/O only. I have
> tested it against xfs, ext4, and btrfs.
>
> Changes since v1:
> + Forwardported from 4.9.10
> + changed name from _NONBLOCKING to *_NOWAIT
> + filemap_range_has_page call moved to closer to (just before) calling filemap_write_and_wait_range().
> + BIO_NOWAIT limited to get_request()
> + XFS fixes
> - included reflink
> - use of xfs_ilock_nowait() instead of a XFS_IOLOCK_NONBLOCKING flag
> - Translate the flag through IOMAP_NOWAIT (iomap) to check for
> block allocation for the file.
> + ext4 coding style
next prev parent reply other threads:[~2017-03-05 14:56 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-28 23:36 [PATCH 0/8 v2] Non-blocking AIO Goldwyn Rodrigues
2017-02-28 23:36 ` [PATCH 1/8] nowait aio: Introduce IOCB_FLAG_NOWAIT Goldwyn Rodrigues
2017-03-01 15:36 ` Christoph Hellwig
2017-03-01 15:56 ` Christoph Hellwig
2017-03-01 16:57 ` Goldwyn Rodrigues
2017-03-01 22:44 ` Christoph Hellwig
2017-02-28 23:36 ` [PATCH 2/8] nowait aio: Return if cannot get hold of i_rwsem Goldwyn Rodrigues
2017-03-01 15:37 ` Christoph Hellwig
2017-02-28 23:36 ` [PATCH 3/8] nowait aio: return if direct write will trigger writeback Goldwyn Rodrigues
2017-03-01 3:46 ` Matthew Wilcox
2017-03-01 15:38 ` Christoph Hellwig
2017-03-02 10:38 ` Jan Kara
2017-03-02 14:12 ` Matthew Wilcox
2017-03-02 15:22 ` Jan Kara
2017-02-28 23:36 ` [PATCH 4/8] nowait aio: Introduce IOMAP_NOWAIT Goldwyn Rodrigues
2017-02-28 23:36 ` [PATCH 5/8] nowait aio: return on congested block device Goldwyn Rodrigues
2017-03-08 7:03 ` Sagi Grimberg
2017-03-08 15:00 ` Goldwyn Rodrigues
2017-03-08 15:28 ` Jan Kara
2017-03-08 15:51 ` Christoph Hellwig
2017-03-08 16:17 ` Jens Axboe
2017-03-09 2:18 ` Goldwyn Rodrigues
2017-02-28 23:36 ` [PATCH 6/8] nowait aio: ext4 Goldwyn Rodrigues
2017-02-28 23:36 ` [PATCH 7/8] nowait aio: xfs Goldwyn Rodrigues
2017-03-01 15:40 ` Christoph Hellwig
2017-02-28 23:36 ` [PATCH 8/8] nowait aio: btrfs Goldwyn Rodrigues
2017-03-05 14:56 ` Avi Kivity [this message]
2017-03-06 8:25 ` [PATCH 0/8 v2] Non-blocking AIO Jan Kara
2017-03-06 8:40 ` Avi Kivity
2017-03-06 15:19 ` Jens Axboe
2017-03-06 15:29 ` Avi Kivity
2017-03-06 15:38 ` Jens Axboe
2017-03-06 15:59 ` Avi Kivity
2017-03-06 16:08 ` Jens Axboe
2017-03-06 16:59 ` Avi Kivity
2017-03-06 17:06 ` Jens Axboe
2017-03-06 18:17 ` Avi Kivity
2017-03-06 18:27 ` Jens Axboe
2017-03-06 18:50 ` Avi Kivity
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=347d19cb-dbb8-1d4f-dfb5-d1dd820dd65d@scylladb.com \
--to=avi@scylladb.com \
--cc=hch@infradead.org \
--cc=jack@suse.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=rgoldwyn@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).