Re: [PATCH v7 0/5] vfs: Non-blockling buffered fs read (page cache only)

2015-04-05 Thread Milosz Tanski
* pages being reclaimed between fincore() and read(). eg, > +* SetPageReferenced(page) or mark_page_accessed(page) or > +* activate_page(page). > +*/ > + for (cur_off = offset; cur_off < end ; ) { > + struct page *page; > + loff_t

Re: [PATCH v7 0/5] vfs: Non-blockling buffered fs read (page cache only)

2015-03-30 Thread Milosz Tanski
OCK is a > better name - EAGAIN says "run it again", but that won't work. > Per definition EWOULDBLOCK seams like a better fit. Like you said above it won't stop blocking unless you do something. I also did a search in the kernel source (excluding drivers / sound direct

Re: [PATCH v7 0/5] vfs: Non-blockling buffered fs read (page cache only)

2015-03-30 Thread Milosz Tanski
or small reads but > not significant for medium and large reads. Needs quantifying. > > And I don't believe that e) will be a problem in the real world. It's > a significant increase in worst-case latency and a negligible increase > in average latency. I've asked at le

Re: [PATCH v7 0/5] vfs: Non-blockling buffered fs read (page cache only)

2015-03-30 Thread Milosz Tanski
ul with RWF_NONWAIT with pwritev, in applications that don't want to block while logging (but it's okay to drop low level log messages). That's a whole different use case in my mind. -- Milosz Tanski CTO 16 East 34th Street, 15th floor New York, NY 10016 p: 646-253-9055 e: mil..

Re: [PATCH v7 0/5] vfs: Non-blockling buffered fs read (page cache only)

2015-03-30 Thread Milosz Tanski
On Mon, Mar 30, 2015 at 6:57 PM, Andrew Morton wrote: > On Mon, 30 Mar 2015 18:49:06 -0400 Milosz Tanski wrote: > >> > A fincore+pread solution that blocks is simply unsafe >> > to use for us. We'll have to stay with the threadpool :-(. >> >> We're

Re: [PATCH v7 0/5] vfs: Non-blockling buffered fs read (page cache only)

2015-03-30 Thread Milosz Tanski
processing the response if we send it down the wire while we process other connections. It becomes even more useful over HTTP2 which provides it's own framing where we can send a partial response frame and move onto other requests in this connection or other connections. -- Milosz Tanski CT

Re: [PATCH v7 0/5] vfs: Non-blockling buffered fs read (page cache only)

2015-03-30 Thread Milosz Tanski
lem in the real world. It's >> a significant increase in worst-case latency and a negligible increase >> in average latency. I've asked at least three times for someone to >> explain why this is unacceptable and no explanation has been provided. > > See above. --

Re: [PATCH v7 0/5] vfs: Non-blockling buffered fs read (page cache only)

2015-03-30 Thread Milosz Tanski
ly. For > the reasons described above. > At the LSF/MM session, the agreement form the active participants (James Bottomley, Ted Tso, Christoph, and I forget the last guy's name) that we should ship both syscalls in the first patch. Personally I don't care, but you're the

Re: [PATCH v7 0/5] vfs: Non-blockling buffered fs read (page cache only)

2015-03-30 Thread Milosz Tanski
atic working set, and leave lots of free memory for the kernel especially for the page cache. For example the Google want to minimize malloc(). So in tcmalloc() they grab large chunks and rarely release it to back to the OS, in fact old version never shrank it. So you can entirely avoid stalls in malloc

Re: [PATCH v7 0/5] vfs: Non-blockling buffered fs read (page cache only)

2015-03-27 Thread Milosz Tanski
On Fri, Mar 27, 2015 at 12:30 PM, Andrew Morton wrote: > On Fri, 27 Mar 2015 08:58:54 -0700 Jeremy Allison wrote: > >> On Fri, Mar 27, 2015 at 02:01:59AM -0700, Andrew Morton wrote: >> > On Fri, 27 Mar 2015 01:48:33 -0700 Christoph Hellwig >> > wrote: >> > >> > > On Fri, Mar 27, 2015 at 01:35:1

Re: [PATCH v7 0/5] vfs: Non-blockling buffered fs read (page cache only)

2015-03-27 Thread Milosz Tanski
a second time around at EOF it'll return 0 instead of EWOULDBLOCK today. I actually test for this in the preadv2 test in xfstest here: https://github.com/mtanski/xfstests/commit/688db24c292999c81ee17caf2b61fe8cf7bb3cd6#diff-114416ea98ce29dde3b5b3d145afbd2bR81. There's one caveat, that

Re: [PATCH v7 0/5] vfs: Non-blockling buffered fs read (page cache only)

2015-03-27 Thread Milosz Tanski
On Thu, Mar 26, 2015 at 11:28 PM, Andrew Morton wrote: > On Mon, 16 Mar 2015 14:27:10 -0400 Milosz Tanski wrote: > >> This patchset introduces two new syscalls preadv2 and pwritev2. They are the >> same syscalls as preadv and pwrite but with a flag argument. Additionally, >

Re: [PATCH v7 0/5] vfs: Non-blockling buffered fs read (page cache only)

2015-03-26 Thread Milosz Tanski
On Thu, Mar 26, 2015 at 3:12 PM, Milosz Tanski wrote: > On Thu, Mar 26, 2015 at 7:55 AM, Christoph Hellwig wrote: >> >> On Mon, Mar 16, 2015 at 02:27:10PM -0400, Milosz Tanski wrote: >> > This patchset introduces two new syscalls preadv2 and pwritev2. They are >&g

Re: [PATCH v7 0/5] vfs: Non-blockling buffered fs read (page cache only)

2015-03-26 Thread Milosz Tanski
On Thu, Mar 26, 2015 at 7:55 AM, Christoph Hellwig wrote: > > On Mon, Mar 16, 2015 at 02:27:10PM -0400, Milosz Tanski wrote: > > This patchset introduces two new syscalls preadv2 and pwritev2. They are the > > same syscalls as preadv and pwrite but with a flag argument. Additio

Re: [PATCH] fstests: generic test for preadv2 behavior on linux

2015-03-16 Thread Milosz Tanski
On Mon, Mar 16, 2015 at 6:02 PM, Dave Chinner wrote: > On Mon, Mar 16, 2015 at 02:34:22PM -0400, Milosz Tanski wrote: >> preadv2 is a new syscall introduced that is like preadv2 but with flag >> argument. The first use case of this is to let us add a flag to perform a >> no

Re: [PATCH] fstests: generic test for preadv2 behavior on linux

2015-03-16 Thread Milosz Tanski
On Mon, Mar 16, 2015 at 5:07 PM, Andreas Dilger wrote: > >> On Mar 16, 2015, at 12:34 PM, Milosz Tanski wrote: >> >> preadv2 is a new syscall introduced that is like preadv2 but with flag > > Sorry, "preadv2 ... is like preadv2"? I already have a fix for

[PATCH] fstests: generic test for preadv2 behavior on linux

2015-03-16 Thread Milosz Tanski
2 + +#endif /* HAVE_PREADV2 */ +#endif /* PREADV2_PWRITEV2_H */ diff --git a/src/preadv2.c b/src/preadv2.c new file mode 100644 index 000..a4f89b5 --- /dev/null +++ b/src/preadv2.c @@ -0,0 +1,150 @@ +/* + * Copyright 2014 Red Hat, Inc. All rights reserved. + * Copyright 2015 Milosz Tanski + * + * Licens

[PATCH v7 2/5] vfs: Define new syscalls preadv2,pwritev2

2015-03-16 Thread Milosz Tanski
New syscalls that take an flag argument. This change does not add any specific flags. Signed-off-by: Milosz Tanski Reviewed-by: Christoph Hellwig --- fs/read_write.c | 172 ++ include/linux/compat.h| 6 ++ include/linux

[PATCH] Add preadv2/pwritev2 documentation.

2015-03-16 Thread Milosz Tanski
New syscalls that are a variation on the preadv/pwritev but support an extra flag argument. Signed-off-by: Milosz Tanski Suggested-by: Jeff Moyer Fixes: Jeff Moyer --- man2/readv.2 | 71 +++- 1 file changed, 61 insertions(+), 10

[PATCH v7 4/5] vfs: RWF_NONBLOCK flag for preadv2

2015-03-16 Thread Milosz Tanski
buted this code. Signed-off-by: Milosz Tanski Reviewed-by: Christoph Hellwig Reviewed-by: Jeff Moyer Acked-by: Sage Weil --- fs/ceph/file.c | 2 ++ fs/cifs/file.c | 6 ++ fs/nfs/file.c | 5 - fs/ocfs2/file.c| 6 ++ fs/pipe.c | 3 ++- fs/read_write.c

[PATCH v7 1/5] vfs: Prepare for adding a new preadv/pwritev with user flags.

2015-03-16 Thread Milosz Tanski
Plumbing the flags argument through the vfs code so they can be passed down to __generic_file_(read/write)_iter function that do the acctual work. Signed-off-by: Milosz Tanski Reviewed-by: Christoph Hellwig Reviewed-by: Jeff Moyer --- drivers/target/target_core_file.c | 6 +++--- fs/nfsd

[PATCH v7 5/5] xfs: add RWF_NONBLOCK support

2015-03-16 Thread Milosz Tanski
From: Christoph Hellwig Add support for non-blocking reads. The guts are handled by the generic code, the only addition is a non-blocking variant of xfs_rw_ilock. Signed-off-by: Christoph Hellwig --- fs/xfs/xfs_file.c | 32 +++- 1 file changed, 27 insertions(+), 5

[PATCH v7 3/5] x86: wire up preadv2 and pwritev2

2015-03-16 Thread Milosz Tanski
Signed-off-by: Milosz Tanski Reviewed-by: Christoph Hellwig --- arch/x86/syscalls/syscall_32.tbl | 2 ++ arch/x86/syscalls/syscall_64.tbl | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl index b3560ec..b37aa9c 100644

[PATCH v7 0/5] vfs: Non-blockling buffered fs read (page cache only)

2015-03-16 Thread Milosz Tanski
O_DIRECT checking early in the process, per. Jeff Moyer - Resolved duplicate (c&p) code in syscall code, per. Jeff - Included perf data in thread cover letter, per. Jeff - Created a new flag (not O_NONBLOCK) for readv2, perf Jeff I have co-developed these changes with Christoph Hellwig.

Re: [PATCH v6 0/7] vfs: Non-blockling buffered fs read (page cache only)

2015-01-21 Thread Milosz Tanski
// TODO: partial reads + if (nread == n) { + state->ret = nread; + tevent_req_done(req); + return tevent_req_post(req, ev); + } + SMBPROFILE_BYTES_ASYNC_START(syscall_asys_pread, profile_p, state->profile_bytes, n); re

Re: [PATCH v12 00/20] DAX: Page cache bypass for filesystems on memory storage

2015-01-08 Thread Milosz Tanski
ely easier. With the help of Volker I hacked up preadv2 support into samba and I hopefully have some numbers from it soon. Finally, I'm putting together a test case for the typical webapp middle-tier service (epoll + threadpool for diskio). Haven't stopped, just progressing on that slower due

Re: [PATCH v6 0/7] vfs: Non-blockling buffered fs read (page cache only)

2014-12-03 Thread Milosz Tanski
On Tue, Dec 2, 2014 at 5:42 PM, Andrew Morton wrote: > > On Tue, 2 Dec 2014 17:17:42 -0500 Milosz Tanski wrote: > > > > There have been several incomplete attempts to implement fincore(). If > > > we were to complete those attempts, preadv2() could be implemented

Re: [PATCH v6 0/7] vfs: Non-blockling buffered fs read (page cache only)

2014-12-02 Thread Milosz Tanski
On Tue, Nov 25, 2014 at 6:01 PM, Andrew Morton wrote: > > On Mon, 10 Nov 2014 11:40:23 -0500 Milosz Tanski wrote: > > > This patcheset introduces an ability to perform a non-blocking read from > > regular files in buffered IO mode. This works by only for those filesystems

Re: [PATCH v6 0/7] vfs: Non-blockling buffered fs read (page cache only)

2014-11-14 Thread Milosz Tanski
; in Linus tree. This is 3.19 stuff I presume ? >> istr akpm picked up execveat recently, so if that goes in first, we'll >> need to respin this anyway.. > > Sure. I just wanted to test with trinity *before* it makes it into the > kernel. Crazy, I know. ;-) I am happy t

Re: [PATCH v6 0/7] vfs: Non-blockling buffered fs read (page cache only)

2014-11-14 Thread Milosz Tanski
not quite sure how to write a test using the framework, the documentation (README) seams very XFS specific and otherwise the test seam to be be split between many different files / directories / C code / shell code. I might be me being slow... but it's just not obvious for me how to glue the who

Re: [PATCH v6 0/7] vfs: Non-blockling buffered fs read (page cache only)

2014-11-11 Thread Milosz Tanski
On Tue, Nov 11, 2014 at 1:44 AM, Dave Chinner wrote: > On Mon, Nov 10, 2014 at 11:40:23AM -0500, Milosz Tanski wrote: >> This patcheset introduces an ability to perform a non-blocking read from >> regular files in buffered IO mode. This works by only for those filesystems >>

[PATCH v6 0/7] vfs: Non-blockling buffered fs read (page cache only)

2014-11-10 Thread Milosz Tanski
unt of IO done by request). I've performed other benchmarks and I have no observed any perf regressions in any of the normal (old) code paths. I have co-developed these changes with Christoph Hellwig. Christoph Hellwig (3): xfs: add RWF_NONBLOCK support fs: pass iocb to generic_write_

[PATCH v6 3/7] x86: wire up preadv2 and pwritev2

2014-11-10 Thread Milosz Tanski
Signed-off-by: Milosz Tanski Reviewed-by: Christoph Hellwig --- arch/x86/syscalls/syscall_32.tbl | 2 ++ arch/x86/syscalls/syscall_64.tbl | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl index 9fe1b5d..d592d87 100644

[PATCH v6 5/7] xfs: add RWF_NONBLOCK support

2014-11-10 Thread Milosz Tanski
From: Christoph Hellwig Add support for non-blocking reads. The guts are handled by the generic code, the only addition is a non-blocking variant of xfs_rw_ilock. Signed-off-by: Christoph Hellwig --- fs/xfs/xfs_file.c | 32 +++- 1 file changed, 27 insertions(+), 5

[PATCH v6 4/7] vfs: RWF_NONBLOCK flag for preadv2

2014-11-10 Thread Milosz Tanski
buted this code. Signed-off-by: Milosz Tanski Reviewed-by: Christoph Hellwig Reviewed-by: Jeff Moyer Acked-by: Sage Weil --- fs/ceph/file.c | 2 ++ fs/cifs/file.c | 6 ++ fs/nfs/file.c | 5 - fs/ocfs2/file.c| 6 ++ fs/pipe.c | 3 ++- fs/read_write.c

[PATCH v6 6/7] fs: pass iocb to generic_write_sync

2014-11-10 Thread Milosz Tanski
a crude version of fallocate. It has been switched to use an open coded variant instead. Signed-off-by: Christoph Hellwig [Small change in generic_write_sync() suggested by Anton Altaparmakov] Signed-off-by: Milosz Tanski Acked-by: Steven Whitehouse Acked-by: Anton Altaparmakov Review

[PATCH v6 2/7] vfs: Define new syscalls preadv2,pwritev2

2014-11-10 Thread Milosz Tanski
New syscalls that take an flag argument. This change does not add any specific flags. Signed-off-by: Milosz Tanski Reviewed-by: Christoph Hellwig --- fs/read_write.c | 172 ++ include/linux/compat.h| 6 ++ include/linux

[PATCH v6 7/7] fs: add a flag for per-operation O_DSYNC semantics

2014-11-10 Thread Milosz Tanski
); return 0; } EOF Signed-off-by: Christoph Hellwig [mil...@adfin.com: comapt syscall changes for RWF_ODSYNC] Signed-off-by: Milosz Tanski Reviewed-by: Jeff Moyer Acked-by: Sage Weil --- fs/ceph/file.c | 4 +++- fs/fuse/file.c | 2 ++ fs/nfs/file.c | 10 ++

[PATCH v6 1/7] vfs: Prepare for adding a new preadv/pwritev with user flags.

2014-11-10 Thread Milosz Tanski
Plumbing the flags argument through the vfs code so they can be passed down to __generic_file_(read/write)_iter function that do the acctual work. Signed-off-by: Milosz Tanski Reviewed-by: Christoph Hellwig Reviewed-by: Jeff Moyer --- drivers/target/target_core_file.c | 6 +++--- fs/nfsd

Re: [fuse-devel] [PATCH v5 7/7] add a flag for per-operation O_DSYNC semantics

2014-11-07 Thread Milosz Tanski
; extra couple of nanoseconds. > > Actually I'd probably write: > >if (type == READ && (flags & RWF_NONBLOCK)) > return -EAGAIN; > >if (type == WRITE && (flags & RWF_DSYNC)) > return -EINVAL;

Re: [PATCH v5 2/7] vfs: Define new syscalls preadv2,pwritev2

2014-11-07 Thread Milosz Tanski
On Thu, Nov 6, 2014 at 6:25 PM, Jeff Moyer wrote: > Milosz Tanski writes: > >> New syscalls that take an flag argument. This change does not add any >> specific >> flags. >> >> Signed-off-by: Milosz Tanski >> Reviewed-by: Christoph Hellwig >>

Re: [PATCH v5 0/7] vfs: Non-blockling buffered fs read (page cache only)

2014-11-06 Thread Milosz Tanski
The pull request for these changes is at: https://bitbucket.org/adfin/linux-fs.git read_call_6 I've updated it so far with various Ack-by from different maintainers (and a small stylistic fix). On Wed, Nov 5, 2014 at 4:14 PM, Milosz Tanski wrote: > This patcheset introduces an ab

Re: [Linux-NTFS-Dev] [PATCH v5 6/7] fs: pass iocb to generic_write_sync

2014-11-06 Thread Milosz Tanski
On Thu, Nov 6, 2014 at 5:52 AM, Anton Altaparmakov wrote: > Hi, > >> On 5 Nov 2014, at 23:14, Milosz Tanski wrote: >> >> From: Christoph Hellwig >> >> Clean up the generic_write_sync by just passing an iocb and a bytes >> written / negative errno

Re: [PATCH v5 0/7] vfs: Non-blockling buffered fs read (page cache only)

2014-11-06 Thread Milosz Tanski
On Thu, Nov 6, 2014 at 2:56 AM, Christoph Hellwig wrote: > This series looks good, do you also have a man page sniplet to document > the new syscalls? > I just send out the two patches for the man pages, ran out of time yesterday to update it for RWF_ODSYNC. -- Milosz Tanski CTO 16

[PATCH v2 2/2] RWF_ODSYNC flag for pwritev2

2014-11-06 Thread Milosz Tanski
Document RWF_ODSYNC flag for pwritev2 as implemented by Christoph Hellwig. Signed-off-by: Milosz Tanski --- man2/readv.2 | 10 ++ 1 file changed, 10 insertions(+) diff --git a/man2/readv.2 b/man2/readv.2 index 31b3870..ff1405c 100644 --- a/man2/readv.2 +++ b/man2/readv.2 @@ -203,6

[PATCH v2 1/2] Add preadv2/pwritev2 documentation.

2014-11-06 Thread Milosz Tanski
New syscalls that are a variation on the preadv/pwritev but support an extra flag argument. Signed-off-by: Milosz Tanski Suggested-by: Jeff Moyer Fixes: Jeff Moyer --- man2/readv.2 | 71 +++- 1 file changed, 61 insertions(+), 10

[PATCH v5 1/7] vfs: Prepare for adding a new preadv/pwritev with user flags.

2014-11-05 Thread Milosz Tanski
Plumbing the flags argument through the vfs code so they can be passed down to __generic_file_(read/write)_iter function that do the acctual work. Signed-off-by: Milosz Tanski Reviewed-by: Christoph Hellwig Reviewed-by: Jeff Moyer --- drivers/target/target_core_file.c | 6 +++--- fs/nfsd

[PATCH v5 5/7] xfs: add RWF_NONBLOCK support

2014-11-05 Thread Milosz Tanski
From: Christoph Hellwig Add support for non-blocking reads. The guts are handled by the generic code, the only addition is a non-blocking variant of xfs_rw_ilock. Signed-off-by: Christoph Hellwig --- fs/xfs/xfs_file.c | 32 +++- 1 file changed, 27 insertions(+), 5

[PATCH v5 4/7] vfs: RWF_NONBLOCK flag for preadv2

2014-11-05 Thread Milosz Tanski
buted this code. Signed-off-by: Milosz Tanski Reviewed-by: Christoph Hellwig Reviewed-by: Jeff Moyer --- fs/ceph/file.c | 2 ++ fs/cifs/file.c | 6 ++ fs/nfs/file.c | 5 - fs/ocfs2/file.c| 6 ++ fs/pipe.c | 3 ++- fs/read_write.c

[PATCH v5 3/7] x86: wire up preadv2 and pwritev2

2014-11-05 Thread Milosz Tanski
Signed-off-by: Milosz Tanski Reviewed-by: Christoph Hellwig --- arch/x86/syscalls/syscall_32.tbl | 2 ++ arch/x86/syscalls/syscall_64.tbl | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl index 9fe1b5d..d592d87 100644

[PATCH v5 7/7] fs: add a flag for per-operation O_DSYNC semantics

2014-11-05 Thread Milosz Tanski
); return 0; } EOF Signed-off-by: Christoph Hellwig [mil...@adfin.com: added flag check to compat_do_readv_writev()] Signed-off-by: Milosz Tanski --- fs/ceph/file.c | 4 +++- fs/fuse/file.c | 2 ++ fs/nfs/file.c | 10 ++ fs/ocfs2/file.c| 6 -- fs/read_

[PATCH v5 2/7] vfs: Define new syscalls preadv2,pwritev2

2014-11-05 Thread Milosz Tanski
New syscalls that take an flag argument. This change does not add any specific flags. Signed-off-by: Milosz Tanski Reviewed-by: Christoph Hellwig --- fs/read_write.c | 176 ++ include/linux/compat.h| 6 ++ include/linux

[PATCH v5 6/7] fs: pass iocb to generic_write_sync

2014-11-05 Thread Milosz Tanski
From: Christoph Hellwig Clean up the generic_write_sync by just passing an iocb and a bytes written / negative errno argument. In addition to simplifying the callers this also prepares for passing a per-operation O_DSYNC flag. Two callers didn't quite fit that scheme: - dio_complete didn't bo

[PATCH v5 0/7] vfs: Non-blockling buffered fs read (page cache only)

2014-11-05 Thread Milosz Tanski
ny perf regressions in any of the normal (old) code paths. I have co-developed these changes with Christoph Hellwig. Christoph Hellwig (3): xfs: add RWF_NONBLOCK support fs: pass iocb to generic_write_sync fs: add a flag for per-operation O_DSYNC semantics Milosz Tanski (4): vfs: Prepare for

Re: [PATCH 2/4] vfs: Define new syscalls preadv2,pwritev2

2014-11-05 Thread Milosz Tanski
I have fixed this in the version I'm going to be resubmitting today. - Milosz On Fri, Oct 24, 2014 at 11:46 AM, Jeff Moyer wrote: > Milosz Tanski writes: > >> diff --git a/include/uapi/asm-generic/unistd.h >> b/include/uapi/asm-generic/unistd.h >> index 227

Re: [PATCH 4/4] vfs: RWF_NONBLOCK flag for preadv2

2014-10-27 Thread Milosz Tanski
ration as being analogous to doing a recv with MSG_NOWAIT ... where it will return data if there's data in the socket buffer, otherwise returns EAGAIN. I Hope this helps. > > On Tue, Oct 21, 2014 at 3:46 PM, Milosz Tanski wrote: >> Filesystems that generic_file_read_iter will

Re: [PATCH 4/4] vfs: RWF_NONBLOCK flag for preadv2

2014-10-24 Thread Milosz Tanski
On Fri, Oct 24, 2014 at 11:55 AM, Jeff Moyer wrote: > Milosz Tanski writes: > >> Filesystems that generic_file_read_iter will not be allowed to perform >> non-blocking reads. This only will read data if it's in the page cache and if >> there is no page error (causin

Re: [PATCH 2/4] vfs: Define new syscalls preadv2,pwritev2

2014-10-24 Thread Milosz Tanski
ogether with the last hunk > from the first patch. > > Otherwise looks good to me: > > Reviewed-by: Christoph Hellwig I pushed the change from the previous patch to the prototype of do_generic_file_read into this patch. -- Milosz Tanski CTO 16 East 34th Street, 15th floor New Yor

Re: [PATCH 1/4] vfs: Prepare for adding a new preadv/pwritev with user flags.

2014-10-24 Thread Milosz Tanski
On Fri, Oct 24, 2014 at 11:12 AM, Jeff Moyer wrote: > Milosz Tanski writes: > >> Plumbing the flags argument through the vfs code so they can be passed down >> to >> __generic_file_(read/write)_iter function

[PATCH] Add preadv2/pwritev2 documentation.

2014-10-21 Thread Milosz Tanski
New syscalls that are a variation on the preadv/pwritev but support an extra flag argument. Signed-off-by: Milosz Tanski Suggested-by: Jeff Moyer Fixes: Jeff Moyer --- man2/readv.2 | 71 +++- 1 file changed, 61 insertions(+), 10

[PATCH 0/4] vfs: Non-blockling buffered fs read (page cache only)

2014-10-21 Thread Milosz Tanski
equest). I've performed other benchmarks and I have no observed any perf regressions in any of the normal (old) code paths. I have co-developed these changes with Christoph Hellwig. Milosz Tanski (4): vfs: Prepare for adding a new preadv/pwritev with user flags. vfs: Define new syscalls

[PATCH 2/4] vfs: Define new syscalls preadv2,pwritev2

2014-10-21 Thread Milosz Tanski
New syscalls that take an flag argument. This change does not add any specific flags. Signed-off-by: Milosz Tanski --- fs/read_write.c | 82 --- include/linux/syscalls.h | 6 +++ include/uapi/asm-generic/unistd.h | 6 ++- mm

[PATCH 4/4] vfs: RWF_NONBLOCK flag for preadv2

2014-10-21 Thread Milosz Tanski
Filesystems that generic_file_read_iter will not be allowed to perform non-blocking reads. This only will read data if it's in the page cache and if there is no page error (causing a re-read). Christoph Hellwig wrote the filesystem specify code (cifs, ofs, shm, xfs). Signed-off-by: Milosz T

[PATCH 1/4] vfs: Prepare for adding a new preadv/pwritev with user flags.

2014-10-21 Thread Milosz Tanski
Plumbing the flags argument through the vfs code so they can be passed down to __generic_file_(read/write)_iter function that do the acctual work. Signed-off-by: Milosz Tanski --- drivers/target/target_core_file.c | 6 +++--- fs/nfsd/vfs.c | 4 ++-- fs/read_write.c

[PATCH 3/4] vfs: Export new vector IO syscalls (with flags) to userland

2014-10-21 Thread Milosz Tanski
This is only for x86_64 and x86. Will add other arch later. Signed-off-by: Milosz Tanski --- arch/x86/syscalls/syscall_32.tbl | 2 ++ arch/x86/syscalls/syscall_64.tbl | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl index

Re: [RFC v3 0/4] vfs: Non-blockling buffered fs read (page cache only)

2014-10-07 Thread Milosz Tanski
sday. Best, - Milosz On Wed, Sep 24, 2014 at 5:46 PM, Milosz Tanski wrote: > This patcheset introduces an ability to perform a non-blocking read from > regular files in buffered IO mode. This works by only for those filesystems > that have data in the page cache. > > It does this

Re: [RFC v3 0/4] vfs: Non-blockling buffered fs read (page cache only)

2014-09-25 Thread Milosz Tanski
On Thu, Sep 25, 2014 at 12:06 AM, Michael Kerrisk wrote: > Hello Milosz, > > On Wed, Sep 24, 2014 at 11:46 PM, Milosz Tanski wrote: >> This patcheset introduces an ability to perform a non-blocking read from >> regular files in buffered IO mode. This works by only for thos

[RFC v3 1/4] vfs: Prepare for adding a new preadv/pwritev with user flags.

2014-09-24 Thread Milosz Tanski
Plumbing the flags argument through the vfs code so they can be passed down to __generic_file_(read/write)_iter function that do the acctual work. Signed-off-by: Milosz Tanski --- drivers/target/target_core_file.c | 6 +++--- fs/nfsd/vfs.c | 4 ++-- fs/read_write.c

[RFC v3 3/4] vfs: Export new vector IO syscalls (with flags) to userland

2014-09-24 Thread Milosz Tanski
This is only for x86_64 and x86. Will add other arch later. Signed-off-by: Milosz Tanski --- arch/x86/syscalls/syscall_32.tbl | 2 ++ arch/x86/syscalls/syscall_64.tbl | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl index

[RFC v3 2/4] vfs: Define new syscalls preadv2,pwritev2

2014-09-24 Thread Milosz Tanski
New syscalls that take an flag argument. This change does not add any specific flags. Signed-off-by: Milosz Tanski --- fs/read_write.c | 82 --- include/linux/syscalls.h | 6 +++ include/uapi/asm-generic/unistd.h | 6 ++- mm

[RFC v3 0/4] vfs: Non-blockling buffered fs read (page cache only)

2014-09-24 Thread Milosz Tanski
uncached cases. I've performed other benchmarks and I have no observed any perf regressions in any of the normal (old) code paths. I have co-developed these changes with Christoph Hellwig. Milosz Tanski (4): vfs: Prepare for adding a new preadv/pwritev with user flags. vfs: Define new sysca

[RFC v3 4/4] vfs: RWF_NONBLOCK flag for preadv2

2014-09-24 Thread Milosz Tanski
Filesystems that generic_file_read_iter will not be allowed to perform non-blocking reads. This only will read data if it's in the page cache and if there is no page error (causing a re-read). Christoph Hellwig wrote the filesystem specify code (cifs, ofs, shm, xfs). Signed-off-by: Milosz T

Re: [RFC PATCH 0/7] Non-blockling buffered fs read (page cache only)

2014-09-22 Thread Milosz Tanski
I'll send out the next RFC with 2 syscalls and magic position values. I'm waiting for Jeff to chime in on the v2 patchset before I send out the next one. On Mon, Sep 22, 2014 at 12:42 PM, Christoph Hellwig wrote: > On Mon, Sep 22, 2014 at 12:32:02PM -0400, Milosz Tanski wrote: &g

Re: [RFC PATCH 0/7] Non-blockling buffered fs read (page cache only)

2014-09-22 Thread Milosz Tanski
s an extra loop. Where this gets hairy is making the non-trivial blocking case work well (as in have concurrent requests for each of the ranges) in the filesystem code. If that's the road we're going to go down I have a gut feeling we're going to get stuck in the same spot(s) as the othe

Re: [RFC v2 0/5] Non-blockling buffered fs read (page cache only)

2014-09-22 Thread Milosz Tanski
On Mon, Sep 22, 2014 at 10:12 AM, Jonathan Corbet wrote: > On Fri, 19 Sep 2014 13:33:14 -0400 > Milosz Tanski wrote: > >> > - Non-blocking I/O has long been supported with a well-understood set >> >of operations - O_NONBLOCK and fcntl(). Why do we need a diffe

Re: [RFC v2 0/5] Non-blockling buffered fs read (page cache only)

2014-09-19 Thread Milosz Tanski
On Fri, Sep 19, 2014 at 10:42 AM, Jonathan Corbet wrote: > On Wed, 17 Sep 2014 22:20:45 + > Milosz Tanski wrote: > >> This patcheset introduces an ability to perform a non-blocking read from >> regular files in buffered IO mode. This works by only for those filesystems

Re: [RFC v2 0/5] Non-blockling buffered fs read (page cache only)

2014-09-19 Thread Milosz Tanski
sted in this and other threads. I'm sorry if this contains any errors, but I took me longer to write this then I wanted to and I had to hurry to wrap up this email. Best, - Milosz On Fri, Sep 19, 2014 at 10:42 AM, Jonathan Corbet wrote: > On Wed, 17 Sep 2014 22:20:45 + > Milosz Tan

Re: [RFC v2 4/5] O_NONBLOCK flag for readv2/preadv2

2014-09-19 Thread Milosz Tanski
On Fri, Sep 19, 2014 at 7:27 AM, Christoph Hellwig wrote: > The subject needs an update now that the flag has been renamed. > You're right, I'm not sure how I missed it. Fixed it locally for the next submission. -- Milosz Tanski CTO 16 East 34th Street, 15th floor New York,

[RFC v2 1/5] Prepare for adding a new readv/writev with user flags.

2014-09-17 Thread Milosz Tanski
Plumbing the flags argument through the vfs code so they can be passed down to __generic_file_(read/write)_iter function that do the acctual work. Signed-off-by: Milosz Tanski --- drivers/target/target_core_file.c | 6 +++--- fs/nfsd/vfs.c | 4 ++-- fs/read_write.c

[RFC v2 0/5] Non-blockling buffered fs read (page cache only)

2014-09-17 Thread Milosz Tanski
I have co-developed these changes with Christoph Hellwig. Christoph Hellwig (1): Check for O_NONBLOCK in all read_iter instances Milosz Tanski (4): Prepare for adding a new readv/writev with user flags. Define new syscalls readv2,preadv2,writev2,pwritev2 Export new vector IO (with flags) t

[RFC v2 5/5] Check for O_NONBLOCK in all read_iter instances

2014-09-17 Thread Milosz Tanski
From: Christoph Hellwig Go through filesystem paths and return EAGAIN if there's an operation (like metadata) that would cause blocking. Signed-off-by: Milosz Tanski --- fs/cifs/file.c| 6 ++ fs/ocfs2/file.c | 6 ++ fs/pipe.c | 3 ++- fs/read_write.c

[RFC v2 4/5] O_NONBLOCK flag for readv2/preadv2

2014-09-17 Thread Milosz Tanski
Filesystems that generic_file_read_iter will not be allowed to perform non-blocking reads. This only will read data if it's in the page cache and if there is no page error (causing a re-read). Signed-off-by: Milosz Tanski --- fs/read_write.c| 4 +++- include/linux/fs.h | 3 ++

[RFC v2 2/5] Define new syscalls readv2,preadv2,writev2,pwritev2

2014-09-17 Thread Milosz Tanski
New syscalls with an extra flag argument. For now all flags except for 0 are not supported. Signed-off-by: Milosz Tanski --- fs/read_write.c | 80 +-- include/linux/syscalls.h | 12 ++ include/uapi/asm-generic/unistd.h | 10

[RFC v2 3/5] Export new vector IO (with flags) to userland

2014-09-17 Thread Milosz Tanski
This is only for x86_64 and x86. Will add other arch later. Signed-off-by: Milosz Tanski --- arch/x86/syscalls/syscall_32.tbl | 4 arch/x86/syscalls/syscall_64.tbl | 4 2 files changed, 8 insertions(+) diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl

Re: [PATCH 2/3] FS-Cache: Reduce cookie ref count if submit fails.

2014-09-17 Thread Milosz Tanski
On Wed, Sep 17, 2014 at 4:23 PM, David Howells wrote: > Milosz Tanski wrote: > >> David, I know you're busy with other things. Would you like me to >> re-spin the cleaned patches for you as a pull requests so you try to >> get this upstream. I really want to

Re: [PATCH 2/7] Define new syscalls readv2,preadv2,writev2,pwritev2

2014-09-17 Thread Milosz Tanski
014 at 11:43 AM, Theodore Ts'o wrote: > On Mon, Sep 15, 2014 at 04:20:37PM -0400, Milosz Tanski wrote: >> New syscalls with an extra flag argument. For now all flags except for 0 are >> not supported. > > This may fall in the category of bike-shedding, and so I apologize in

Re: [PATCH 7/7] check for O_NONBLOCK in all read_iter instances

2014-09-17 Thread Milosz Tanski
somebody has a clear workflow that ensures this doesn't happen I'm more then willing to follow it. -- Milosz Tanski CTO 16 East 34th Street, 15th floor New York, NY 10016 p: 646-253-9055 e: mil...@adfin.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

Re: [RFC PATCH 0/7] Non-blockling buffered fs read (page cache only)

2014-09-16 Thread Milosz Tanski
Jeff, Which git repository do the man pages live in? - Milosz On Tue, Sep 16, 2014 at 3:30 PM, Jeff Moyer wrote: > Milosz Tanski writes: > >> This patcheset introduces an ability to perform a non-blocking read from >> regular files in buffered IO mode. This works by only for

Re: [PATCH 2/7] Define new syscalls readv2,preadv2,writev2,pwritev2

2014-09-16 Thread Milosz Tanski
Good point. I will put the shared functionality in a static function. On Tue, Sep 16, 2014 at 3:20 PM, Jeff Moyer wrote: > Milosz Tanski writes: > >> New syscalls with an extra flag argument. For now all flags except for 0 are >> not supported. > > The blatant copy

Re: [PATCH 7/7] check for O_NONBLOCK in all read_iter instances

2014-09-16 Thread Milosz Tanski
I am not Christoph, we collaborated and he sent me this patch. On Tue, Sep 16, 2014 at 3:27 PM, Jeff Moyer wrote: > Christoph Hellwig writes: > > Hrm, you're not Christoph... > >> Acked-by: Milosz Tanski >> --- >> fs/ceph/file.c|2 ++ >> f

Re: [PATCH 4/7] O_NONBLOCK flag for readv2/preadv2

2014-09-16 Thread Milosz Tanski
On Tue, Sep 16, 2014 at 3:19 PM, Jeff Moyer wrote: > Milosz Tanski writes: > >> Filesystems that generic_file_read_iter will not be allowed to perform >> non-blocking reads. This only will read data if it's in the page cache and if >> there is no page error (causing

Re: [RFC PATCH 0/7] Non-blockling buffered fs read (page cache only)

2014-09-15 Thread Milosz Tanski
er wrote: > Hi, Milosz, > > I CC'd Michael Kerrisk, in case he has any opinions on the matter. > > Milosz Tanski writes: > >> This patcheset introduces an ability to perform a non-blocking read from >> regular files in buffered IO mode. This works by only for tho

Re: [RFC PATCH 0/7] Non-blockling buffered fs read (page cache only)

2014-09-15 Thread Milosz Tanski
submission for a number of the usual reasons. Best, - Milosz On Mon, Sep 15, 2014 at 5:33 PM, Andreas Dilger wrote: > On Sep 15, 2014, at 2:20 PM, Milosz Tanski wrote: > >> This patcheset introduces an ability to perform a non-blocking read >> from regular files in buffered IO

Re: [PATCH 6/7] move flags enforcement to vfs_preadv/vfs_pwritev

2014-09-15 Thread Milosz Tanski
Will fix this for the next submission. On Mon, Sep 15, 2014 at 5:15 PM, Christoph Hellwig wrote: > This should simply be folded into patch 2. -- Milosz Tanski CTO 16 East 34th Street, 15th floor New York, NY 10016 p: 646-253-9055 e: mil...@adfin.com -- To unsubscribe from this list: s

Re: [PATCH 1/7] Prepare for adding a new readv/writev with user flags.

2014-09-15 Thread Milosz Tanski
I'll redo with the flag inside of kiocb for the next submission. On Mon, Sep 15, 2014 at 5:15 PM, Christoph Hellwig wrote: > On Mon, Sep 15, 2014 at 09:28:28PM +0100, Al Viro wrote: >> On Mon, Sep 15, 2014 at 04:20:17PM -0400, Milosz Tanski wrote: >> > Plumbing the flags a

Re: [RFC PATCH 0/7] Non-blockling buffered fs read (page cache only)

2014-09-15 Thread Milosz Tanski
aggrb=177339KB/s, minb=213KB/s, maxb=176375KB/s, mint=600020msec, maxt=600178msec On Mon, Sep 15, 2014 at 4:20 PM, Milosz Tanski wrote: > This patcheset introduces an ability to perform a non-blocking read from > regular files in buffered IO mode. This works by only for those filesystems >

[PATCH 4/7] O_NONBLOCK flag for readv2/preadv2

2014-09-15 Thread Milosz Tanski
Filesystems that generic_file_read_iter will not be allowed to perform non-blocking reads. This only will read data if it's in the page cache and if there is no page error (causing a re-read). Signed-off-by: Milosz Tanski --- fs/read_write.c |4 ++-- mm/filemap.c|

[PATCH 2/7] Define new syscalls readv2,preadv2,writev2,pwritev2

2014-09-15 Thread Milosz Tanski
New syscalls with an extra flag argument. For now all flags except for 0 are not supported. Signed-off-by: Milosz Tanski --- fs/read_write.c | 100 + include/linux/syscalls.h | 12 + include/uapi/asm-generic/unistd.h | 10

[PATCH 3/7] Export new vector IO (with flags) to userland

2014-09-15 Thread Milosz Tanski
This is only for x86_64 and x86. Will add other arch later. Signed-off-by: Milosz Tanski --- arch/x86/syscalls/syscall_32.tbl |4 arch/x86/syscalls/syscall_64.tbl |4 2 files changed, 8 insertions(+) diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32

[PATCH 1/7] Prepare for adding a new readv/writev with user flags.

2014-09-15 Thread Milosz Tanski
Plumbing the flags argument through the vfs code so they can be passed down to __generic_file_(read/write)_iter function that do the acctual work. Signed-off-by: Milosz Tanski --- drivers/target/target_core_file.c |6 +++--- fs/afs/internal.h |2 +- fs/afs/write.c

  1   2   >