From: Christoph Hellwig <hch@lst.de>
To: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Christoph Hellwig <hch@lst.de>, Andrew Morton <akpm@osdl.org>,
lkml <linux-kernel@vger.kernel.org>,
Benjamin LaHaise <bcrl@kvack.org>,
cel@citi.umich.edu
Subject: Re: [PATCH 1/3] Vectorize aio_read/aio_write methods
Date: Wed, 10 May 2006 10:00:37 +0200 [thread overview]
Message-ID: <20060510080037.GA2484@lst.de> (raw)
In-Reply-To: <1147219062.30738.8.camel@dyn9047017100.beaverton.ibm.com>
On Tue, May 09, 2006 at 04:57:42PM -0700, Badari Pulavarty wrote:
> > > we can get the followup patch done within the next week or two so we can
> > > get it all tested at the same time. Although from your description it
> > > doesn't sound like it'll be completely trivial...
> >
> > That patch is lots of tirival and boring work. If anyone wants to beat
> > me to it:
>
> Well, I am not sure if you mean *exactly* this..
>
> So far, I have this. I really don't like the idea of
> adding .aio_read/.aio_write methods for the filesystems who currently
> don't have one (so we can force their .read/.write to do_sync_*()).
Why don't you like this idea? It helps to sort out callers into two
categories. The following is a something I wrote up to put into
Documentation/ somewhere once these patches are in.
-------- snip --------
There are two ways to implement read/write for filesystems and drivers:
The simple way is to implement the read and write methods. Normal
synchronous, single buffer requests are handed directly to the driver in
this case. Vectored requests are emulated using a loop in the higher
level code. AIO requests are silently performed synchronous.
This method is normally used for character drivers and synthetic
filesystems.
The advanced method is to implement the aio_read and aio_write methods.
These allow the request to be done asynchronously and submit multiple
IO vectores in parallel. A page cache based filesystem gets this
functionality by freee by using the routines from filemap.c - in fact
there is not easy way to use the generic page cache code without
implementing aio_read and aio_write. The other big user of this
interface are sockets. Very few character driver need this complexity.
-------- snip --------
> Is there a way to fix callers of .read/.write() methods to use
> something like do_sync_read/write - that way we can take out
> .read/.write completely ?
The only way to fix this is to add some kernel_read/kernel_write helpers
that factor out the use aio_read / aio_write if present and wait for
I/O completion logic from vfs_read/vfs_write. I started on that but it
got very messy.
> Anyway, here it is compiled but untested.. I think I can clean up
> more in filemap.c (after reading through your suggestions). Please
> let me know, if I am on wrong path ...
Currently I don't have time to actually apply the patchlkit and look at
the result, so I'll defer further comments. Beside maybe not doing all
possible cleanups (e.g. I still see generic_file_write_nolock) this
patch looks very good.
next prev parent reply other threads:[~2006-05-10 8:01 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-02 15:07 [PATCH 0/3] VFS changes to collapse AIO and vectored IO into single (set of) fileops Badari Pulavarty
2006-05-02 15:08 ` [PATCH 1/3] Vectorize aio_read/aio_write methods Badari Pulavarty
2006-05-02 15:20 ` Chuck Lever
2006-05-02 15:35 ` Badari Pulavarty
2006-05-02 15:09 ` [PATCH 2/3] Remove readv/writev methods and use aio_read/aio_write instead Badari Pulavarty
2006-05-02 15:11 ` [PATCH 3/3] Core aio changes to support vectored AIO Badari Pulavarty
2006-05-09 18:03 ` [PATCH 0/3] VFS changes to collapse AIO and vectored IO into single (set of) fileops Badari Pulavarty
2006-05-09 18:07 ` [PATCH 1/3] Vectorize aio_read/aio_write methods Badari Pulavarty
2006-05-09 19:01 ` Andrew Morton
2006-05-09 19:03 ` Christoph Hellwig
2006-05-09 19:13 ` Andrew Morton
2006-05-09 19:20 ` Christoph Hellwig
2006-05-09 23:57 ` Badari Pulavarty
2006-05-10 8:00 ` Christoph Hellwig [this message]
2006-05-10 15:01 ` Badari Pulavarty
2006-05-10 16:01 ` Badari Pulavarty
2006-05-10 20:50 ` Badari Pulavarty
2006-05-09 20:07 ` Badari Pulavarty
2006-05-09 23:53 ` Badari Pulavarty
2006-05-09 18:07 ` [PATCH 2/3] Remove readv/writev methods and use aio_read/aio_write instead Badari Pulavarty
2006-05-09 18:08 ` [PATCH 3/3] Zach's core aio changes to support vectored AIO Badari Pulavarty
2006-05-09 18:55 ` christoph
2006-05-09 20:05 ` Badari Pulavarty
2006-05-09 18:14 ` [PATCH 0/3] VFS changes to collapse AIO and vectored IO into single (set of) fileops Benjamin LaHaise
2006-05-11 15:38 ` [PATCH 0/4] VFS fileop cleanups by collapsing AIO and vector IO Badari Pulavarty
2006-05-11 15:38 ` [PATCH 1/4] Vectorize aio_read/aio_write methods Badari Pulavarty
2006-05-11 18:39 ` Andrew Morton
2006-05-11 19:33 ` Mark Fasheh
2006-05-11 18:47 ` Andrew Morton
2006-05-11 19:07 ` Badari Pulavarty
2006-05-11 20:21 ` Andrew Morton
2006-05-11 20:45 ` Badari Pulavarty
[not found] ` <4463AB55.2010105@citi.umich.edu>
[not found] ` <4463B368.9050602@us.ibm.com>
[not found] ` <4463B7B0.4000102@citi.umich.edu>
2006-05-11 22:50 ` Badari Pulavarty
2006-05-12 7:38 ` Christoph Hellwig
2006-05-11 18:52 ` Andrew Morton
2006-05-11 19:12 ` Badari Pulavarty
2006-05-12 10:03 ` Andrew Morton
2006-05-12 10:08 ` Andrew Morton
2006-05-12 13:56 ` Badari Pulavarty
2006-05-11 15:40 ` [PATCH 2/4] Remove readv/writev methods and use aio_read/aio_write instead Badari Pulavarty
2006-05-11 15:42 ` [PATCH 3/4] Core aio changes to support vectored AIO Badari Pulavarty
2006-05-11 15:43 ` [PATCH 4/4] Streamline generic_file_* interfaces and filemap cleanups Badari Pulavarty
2006-05-15 21:19 ` [PATCH 0/4] VFS fileop cleanups by collapsing AIO and vector IO Badari Pulavarty
2006-05-15 21:21 ` [PATCH 1/4] Vectorize aio_read/aio_write methods Badari Pulavarty
2006-05-15 21:22 ` [PATCH 2/4] Remove readv/writev methods and use aio_read/aio_write instead Badari Pulavarty
2006-05-22 1:00 ` Andrew Morton
2006-05-22 4:39 ` Badari Pulavarty
2006-05-22 5:34 ` Christoph Hellwig
2006-05-22 8:16 ` Ian Kent
2006-05-22 8:19 ` Ian Kent
2006-05-22 9:29 ` Andrew Morton
2006-05-22 9:35 ` Andrew Morton
2006-05-22 10:32 ` Christoph Hellwig
2006-05-22 10:44 ` Andrew Morton
2006-05-22 10:50 ` Ian Kent
2006-05-22 15:24 ` Badari Pulavarty
2006-05-22 15:00 ` Badari Pulavarty
2006-05-22 17:06 ` Andrew Morton
2006-05-22 17:24 ` Badari Pulavarty
2006-05-23 8:29 ` Ian Kent
2006-05-23 14:35 ` Ian Kent
2006-05-28 0:15 ` Badari Pulavarty
2006-05-29 7:06 ` Ian Kent
2006-05-15 21:22 ` [PATCH 3/4] Core aio changes to support vectored AIO Badari Pulavarty
2006-05-15 21:23 ` [PATCH 4/4] Streamline generic_file_* interfaces and filemap cleanups Badari Pulavarty
2006-05-15 22:28 ` Nathan Scott
2006-05-15 22:42 ` Andrew Morton
2006-05-15 22:56 ` Nathan Scott
2006-05-15 22:47 ` Badari Pulavarty
2006-05-16 10:50 ` christoph
-- strict thread matches above, loose matches on Subject: below --
2006-03-08 0:19 [RFC PATCH 0/3] VFS changes to collapse all the vectored and AIO support Badari Pulavarty
2006-03-08 0:22 ` [PATCH 1/3] Vectorize aio_read/aio_write methods Badari Pulavarty
2006-03-08 12:44 ` christoph
2006-02-02 16:12 [PATCH 0/3] VFS changes to collapse all the vectored and AIO support Badari Pulavarty
2006-02-02 16:14 ` [PATCH 1/3] Vectorize aio_read/aio_write methods Badari Pulavarty
2006-02-04 13:28 ` Christoph Hellwig
2006-02-04 22:10 ` Badari Pulavarty
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=20060510080037.GA2484@lst.de \
--to=hch@lst.de \
--cc=akpm@osdl.org \
--cc=bcrl@kvack.org \
--cc=cel@citi.umich.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=pbadari@us.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox