[PATCH -mm 0/10][RFC] aio: make struct kiocb private

2007-01-15 Thread Nate Diller
This series is an attempt to generalize the async I/O paths to be implementation agnostic. It completely eliminates knowledge of the kiocb structure in the generic code and makes it private within the current aio code. Things get noticeably cleaner without that layering violation. The new interf

[PATCH -mm 1/10][RFC] aio: scm remove struct siocb

2007-01-15 Thread Nate Diller
this patch removes struct sock_iocb Its purpose seems to have dwindled to a mere container for struct scm_cookie, and all of the users of scm_cookie seem to require re-initializing it each time anyway. Besides, keeping such data around from one call to the next seems to me like a layering violati

[PATCH -mm 4/10][RFC] aio: convert aio_complete to file_endio_t

2007-01-15 Thread Nate Diller
Define a new function typedef for I/O completion at the file/iovec level -- typedef void (file_endio_t)(void *endio_data, ssize_t count, int err); and convert aio_complete and all its callers to this new prototype. --- drivers/usb/gadget/inode.c | 24 +++--- fs/aio.c

[PATCH -mm 5/10][RFC] aio: make blk_directIO use file_endio_t

2007-01-15 Thread Nate Diller
Convert the internals of blkdev_direct_IO to use a generic endio function, instead of directly calling aio_complete. This may also fix some bugs/races in this code, for instance it checks bio->bi_size instead of assuming it's zero, and it atomically accumulates the bytes_done counter (assuming tha

[PATCH -mm 6/10][RFC] aio: make nfs_directIO use file_endio_t

2007-01-15 Thread Nate Diller
This converts the iternals of nfs's directIO support to use a generic endio function, instead of directly calling aio_complete. It's pretty easy because it already has a pretty abstracted completion path. --- diff -urpN -X dontdiff a/fs/nfs/direct.c b/fs/nfs/direct.c --- a/fs/nfs/direct.c 2007

[PATCH -mm 3/10][RFC] aio: use iov_length instead of ki_left

2007-01-15 Thread Nate Diller
Convert code using iocb->ki_left to use the more generic iov_length() call. --- diff -urpN -X dontdiff a/fs/ocfs2/file.c b/fs/ocfs2/file.c --- a/fs/ocfs2/file.c 2007-01-10 11:50:26.0 -0800 +++ b/fs/ocfs2/file.c 2007-01-10 12:42:09.0 -0800 @@ -1157,7 +1157,7 @@ static ssize_t

[PATCH -mm 9/10][RFC] aio: usb gadget remove aio file ops

2007-01-15 Thread Nate Diller
This removes the aio implementation from the usb gadget file system. Aside from making very creative (!) use of the aio retry path, it can't be of any use performance-wise because it always kmalloc()s a bounce buffer for the *whole* I/O size. Perhaps the only reason to keep it around is the abili

[PATCH -mm 7/10][RFC] aio: make __blockdev_direct_IO use file_endio_t

2007-01-15 Thread Nate Diller
This converts the internals of __blockdev_direct_IO in fs/direct-io.c to use a generic endio function, instead of directly calling aio_complete. It also changes the semantics of dio_iodone to be more friendly to its only users, xfs and ocfs2. This allows the caller to know how to release locks an

Re: [PATCH -mm 3/10][RFC] aio: use iov_length instead of ki_left

2007-01-15 Thread Christoph Hellwig
On Mon, Jan 15, 2007 at 05:54:50PM -0800, Nate Diller wrote: > Convert code using iocb->ki_left to use the more generic iov_length() call. No way. We need to reduce the numer of iovec traversals, not adding more of them. - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel"

[PATCH -mm 8/10][RFC] aio: make direct_IO aops use file_endio_t

2007-01-15 Thread Nate Diller
This converts the _locking variant of blockdev_direct_IO to use a generic endio function, and updates all the FS callsites. --- Documentation/filesystems/Locking |5 +++-- Documentation/filesystems/vfs.txt |5 +++-- fs/block_dev.c|9 - fs/ext2/inode.c

[PATCH -mm 2/10][RFC] aio: net use struct socket for io

2007-01-15 Thread Nate Diller
Remove unused arg from socket operations The sendmsg and recvmsg socket operations take a kiocb pointer, but none of the functions actually use it. There's really no need even theoretically, it's really quite ugly having it there at all. Also, removing it will pave the way for a more generic com

Re: [PATCH -mm 0/10][RFC] aio: make struct kiocb private

2007-01-15 Thread Christoph Hellwig
On Mon, Jan 15, 2007 at 05:54:50PM -0800, Nate Diller wrote: > This series is an attempt to generalize the async I/O paths to be > implementation agnostic. It completely eliminates knowledge of > the kiocb structure in the generic code and makes it private within the > current aio code. Things ge

Re: [PATCH -mm 0/10][RFC] aio: make struct kiocb private

2007-01-15 Thread Nate Diller
On 1/15/07, Christoph Hellwig <[EMAIL PROTECTED]> wrote: On Mon, Jan 15, 2007 at 05:54:50PM -0800, Nate Diller wrote: > This series is an attempt to generalize the async I/O paths to be > implementation agnostic. It completely eliminates knowledge of > the kiocb structure in the generic code and

Re: [PATCH -mm 3/10][RFC] aio: use iov_length instead of ki_left

2007-01-15 Thread Nate Diller
On 1/15/07, Christoph Hellwig <[EMAIL PROTECTED]> wrote: On Mon, Jan 15, 2007 at 05:54:50PM -0800, Nate Diller wrote: > Convert code using iocb->ki_left to use the more generic iov_length() call. No way. We need to reduce the numer of iovec traversals, not adding more of them. ok, I can work

Re: [PATCH -mm 2/10][RFC] aio: net use struct socket for io

2007-01-15 Thread Stephen Hemminger
On Mon, 15 Jan 2007 17:54:50 -0800 Nate Diller <[EMAIL PROTECTED]> wrote: > Remove unused arg from socket operations > > The sendmsg and recvmsg socket operations take a kiocb pointer, but none of > the functions actually use it. There's really no need even theoretically, > it's really quite ugl

Re: [PATCH -mm 4/10][RFC] aio: convert aio_complete to file_endio_t

2007-01-15 Thread David Brownell
On Monday 15 January 2007 5:54 pm, Nate Diller wrote: > --- a/drivers/usb/gadget/inode.c 2007-01-12 14:42:29.0 -0800 > +++ b/drivers/usb/gadget/inode.c 2007-01-12 14:25:34.0 -0800 > @@ -559,35 +559,32 @@ static int ep_aio_cancel(struct kiocb *i > return value; > } >

Re: [PATCH -mm 9/10][RFC] aio: usb gadget remove aio file ops

2007-01-15 Thread David Brownell
On Monday 15 January 2007 5:54 pm, Nate Diller wrote: > This removes the aio implementation from the usb gadget file system. NAK. I see a deep mis-understanding here. > Aside > from making very creative (!) use of the aio retry path, it can't be of any > use performance-wise Other than the