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

2007-01-17 Thread Nate Diller
On Wed, 17 Jan 2007, Benjamin LaHaise wrote: On Mon, Jan 15, 2007 at 08:25:15PM -0800, Nate Diller wrote: the right thing to do from a design perspective. Hopefully it enables a new architecture that can reduce context switches in I/O completion, and reduce overhead. That's the real m

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

2007-01-16 Thread Nate Diller
On 1/15/07, David Brownell <[EMAIL PROTECTED]> wrote: 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,3

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

2007-01-16 Thread Nate Diller
On 1/15/07, David Brownell <[EMAIL PROTECTED]> wrote: 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

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

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 t

[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

[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 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

[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 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 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 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 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 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 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

Re: [take22 0/4] kevent: Generic event handling mechanism.

2006-11-02 Thread Nate Diller
On 11/1/06, Evgeniy Polyakov <[EMAIL PROTECTED]> wrote: On Wed, Nov 01, 2006 at 06:12:41PM -0800, Nate Diller ([EMAIL PROTECTED]) wrote: > Indesiciveness has certainly been an issue here, but I remember akpm > and Ulrich both giving concrete suggestions. I was particularly >

Re: [take22 0/4] kevent: Generic event handling mechanism.

2006-11-01 Thread Nate Diller
On 11/1/06, Evgeniy Polyakov <[EMAIL PROTECTED]> wrote: On Wed, Nov 01, 2006 at 06:20:43PM +, Oleg Verych ([EMAIL PROTECTED]) wrote: > > Hallo, Evgeniy Polyakov. Hello, Oleg. > On 2006-11-01, you wrote: > [] > >> Quantifying "how much more scalable" would be nice, as would be some > >> exam

Re: [PATCH 00/20] vm deadlock avoidance for NFS, NBD and iSCSI (take 7)

2006-09-12 Thread Nate Diller
On 9/12/06, Linus Torvalds <[EMAIL PROTECTED]> wrote: On Tue, 12 Sep 2006, Peter Zijlstra wrote: > > Linus, when I mentioned swap over network to you in Ottawa, you said it was > a valid use case, that people actually do and want this. Can you agree with > the approach taken in these patches?