linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ming Lei <ming.lei@canonical.com>
Subject: Re: linux-next: manual merge of the block tree with the vfs tree
Date: Sun, 1 Feb 2015 05:56:19 +0000	[thread overview]
Message-ID: <20150201055619.GA31780@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20150129051555.GC29656@ZenIV.linux.org.uk>

On Thu, Jan 29, 2015 at 05:15:55AM +0000, Al Viro wrote:
> On Wed, Jan 28, 2015 at 06:11:02PM +0100, Christoph Hellwig wrote:
> > On Tue, Jan 27, 2015 at 04:54:22AM +0000, Al Viro wrote:
> > > I don't mind opening a never-rebased branch for generic iov_iter-related stuff;
> > > if you prefer to handle it that way - just tell.  The first two patches
> > > from that series would definitely go there; as for the rest... no preferences
> > > here.
> > 
> > It might make sense to just keep the VFS patches in your tree.
> > The target ones also are something I'd prefer if it goes through Nic
> > with additional review.  In addition they aren't really critical,
> > so if you merge the prep patches now we can feed the rest through
> > the proper trees in the .21 merge window.
> 
> Done.  The first two are in #iov_iter now (merged into #for-next), the
> rest is dropped.  And #iov_iter is in never-rebased mode, so feel free
> to pull it wherever you need it.

FWIW, there's an interesting question about the second commit in there -
what do we want vfs_iter_{read,write}() to do with *iter in case if it
has hit this:
        if (ret == -EIOCBQUEUED)
                ret = wait_on_sync_kiocb(&kiocb);

Do we require ->read_iter() and ->write_iter() on sync kiocb to do all
advancing the iter before returning -EIOCBQUEUED?  What's more, do we
ever want to have it returned on sync kiocb?  IOW, is there any point
in having that wait in callers?

Note that there are _very_ few drivers that ever do that; fs/direct_io.c,
for example, will wait for completion in case of sync kiocb.  AFAICS,
there are exactly two drivers like that: drivers/usb/gadget/legacy/inode.c
and drivers/usb/gadget/function/f_fs.c.  And the latter is very easy to
convert to "waits in case of sync kiocb" - there already are two codepaths
({read,write} and aio_{read,write}) and it's trivial to teach the sync
path to deal with arbitrary iov_iter, with aio side of things doing the
sync variant in case of sync kiocb.  Cheaper, as well, since we don't need
to copy iovec, etc.

I'm not sure if ep_io() and ep_aio_rwtail() + wait for completion are
eqiuvalent; ep_read/ep_write are very easy to turn into sync side of
->read_iter/->write_iter and if that's equivalent to ep_aio_read/ep_aio_write
on sync kiocb + waiting for completion, we are fine.

Comments?

  reply	other threads:[~2015-02-01  5:56 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27  3:57 linux-next: manual merge of the block tree with the vfs tree Stephen Rothwell
2015-01-27  4:00 ` Jens Axboe
2015-01-27  4:54   ` Al Viro
2015-01-28 17:11     ` Christoph Hellwig
2015-01-29  5:15       ` Al Viro
2015-02-01  5:56         ` Al Viro [this message]
2015-02-02  8:06           ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2022-11-28  0:20 Stephen Rothwell
2022-07-15  3:09 Stephen Rothwell
2022-07-14  2:08 Stephen Rothwell
2022-07-14 16:36 ` Jens Axboe
2022-07-15  0:52   ` Al Viro
2022-07-15  1:04     ` Al Viro
2022-07-18  2:59       ` Stephen Rothwell
2022-07-18  4:58         ` Al Viro
2022-07-19 16:52           ` Jens Axboe
2022-07-20  2:45             ` Al Viro
2022-07-20  3:00               ` Jens Axboe
2022-07-11  3:57 Stephen Rothwell
2022-07-11  3:38 Stephen Rothwell
2022-05-23  2:28 Stephen Rothwell
2022-05-23  2:58 ` Jens Axboe
2022-05-23 22:54 ` Stephen Rothwell
2021-01-27  3:24 Stephen Rothwell
2019-12-20  1:36 Stephen Rothwell
2019-12-20  5:34 ` Jens Axboe
2020-01-20  1:40   ` Stephen Rothwell
2020-01-20  2:45     ` Jens Axboe
2020-01-20  2:57       ` Jens Axboe
2018-05-29  4:37 Stephen Rothwell
2018-05-29  4:33 Stephen Rothwell
2018-05-29  8:12 ` Christoph Hellwig
2018-05-29 14:22   ` Jens Axboe
2018-05-29 21:40     ` Stephen Rothwell
2018-05-29 22:17       ` Jens Axboe
2017-02-02  2:44 Stephen Rothwell
2017-02-21 22:14 ` Stephen Rothwell
2016-12-12  1:31 Stephen Rothwell
2016-12-12  1:44 ` Al Viro
2016-12-12  2:00 ` Ming Lei
2015-02-09  3:55 Stephen Rothwell
2013-04-04  2:16 Stephen Rothwell
2010-05-18  3:04 Stephen Rothwell
2010-05-18 15:37 ` H Hartley Sweeten

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=20150201055619.GA31780@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=ming.lei@canonical.com \
    --cc=sfr@canb.auug.org.au \
    /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).