From: Andrew Morton <akpm@linux-foundation.org>
To: Milosz Tanski <milosz@adfin.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Christoph Hellwig <hch@infradead.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-aio@kvack.org" <linux-aio@kvack.org>,
Mel Gorman <mgorman@suse.de>,
Volker Lendecke <Volker.Lendecke@sernet.de>,
Tejun Heo <tj@kernel.org>, Jeff Moyer <jmoyer@redhat.com>,
Theodore Ts'o <tytso@mit.edu>, Al Viro <viro@zeniv.linux.org.uk>,
Linux API <linux-api@vger.kernel.org>,
Michael Kerrisk <mtk.manpages@gmail.com>,
linux-arch@vger.kernel.org
Subject: Re: [PATCH v6 0/7] vfs: Non-blockling buffered fs read (page cache only)
Date: Tue, 2 Dec 2014 14:42:00 -0800 [thread overview]
Message-ID: <20141202144200.a4ca81a46a43563a8874fd8e@linux-foundation.org> (raw)
In-Reply-To: <CANP1eJEALZTwMv0Z1udmPWKhfGmpe+idtdRASp62Jm_V0N2HcQ@mail.gmail.com>
On Tue, 2 Dec 2014 17:17:42 -0500 Milosz Tanski <milosz@adfin.com> wrote:
> > There have been several incomplete attempts to implement fincore(). If
> > we were to complete those attempts, preadv2() could be implemented
> > using fincore()+pread(). Plus we get fincore(), which is useful for
> > other (but probably similar) reasons. Probably fincore()+pwrite() could
> > be used to implement pwritev2(), but I don't know what pwritev2() does
> > yet.
> >
> > Implementing fincore() is more flexible, requires less code and is less
> > likely to have bugs. So why not go that way? Yes, it's more CPU
> > intensive, but how much? Is the difference sufficient to justify the
> > preadv2()/pwritev2() approach?
>
> I would like to see a fincore() functionality (for other reasons) I
> don't think it does the job here. fincore() + preadv() is inherently
> racy as there's no guarantee that the data becomes uncached between
> the two calls.
There will always be holes. For example find_get_page() could block on
lock_page() while some other process is doing IO.
page_cache_async_readahead() does lots of memory allocation which can
get blocked for long periods in the page allocator.
page_cache_async_readahead() can block on synchronous metadata reads,
etc.
The question is whether a simpler approach such as fincore() will be
sufficient.
> This may not matter in some cases, but in others (ones
> that I'm trying to solve) it will introduce unexpected latency.
Details?
> There's no overlap between prwritev2 and fincore() functionality.
Do we actually need pwritev2()? What's the justification for that?
Please let's examine the alternative(s) seriously. It would be mistake
to add preadv2/pwritev2 if fincore+pread would have sufficed.
--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org. For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>
next prev parent reply other threads:[~2014-12-02 22:42 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-10 16:40 [PATCH v6 0/7] vfs: Non-blockling buffered fs read (page cache only) Milosz Tanski
2014-11-10 16:40 ` [PATCH v6 1/7] vfs: Prepare for adding a new preadv/pwritev with user flags Milosz Tanski
2014-11-10 16:40 ` [PATCH v6 2/7] vfs: Define new syscalls preadv2,pwritev2 Milosz Tanski
2014-11-11 21:09 ` Jeff Moyer
2014-11-12 13:18 ` mohanty bhagaban
2014-11-10 16:40 ` [PATCH v6 3/7] x86: wire up preadv2 and pwritev2 Milosz Tanski
2014-11-10 16:40 ` [PATCH v6 4/7] vfs: RWF_NONBLOCK flag for preadv2 Milosz Tanski
2014-11-10 16:40 ` [PATCH v6 5/7] xfs: add RWF_NONBLOCK support Milosz Tanski
2014-11-10 16:40 ` [PATCH v6 6/7] fs: pass iocb to generic_write_sync Milosz Tanski
2014-11-10 16:40 ` [PATCH v6 7/7] fs: add a flag for per-operation O_DSYNC semantics Milosz Tanski
2014-11-11 6:44 ` [PATCH v6 0/7] vfs: Non-blockling buffered fs read (page cache only) Dave Chinner
2014-11-11 16:02 ` Milosz Tanski
2014-11-11 17:03 ` Jeff Moyer
2014-11-11 21:42 ` Dave Chinner
2014-11-11 23:21 ` Jeff Moyer
2014-11-11 22:49 ` Theodore Ts'o
2014-11-11 23:27 ` Thomas Gleixner
2014-11-11 21:40 ` Dave Chinner
2014-11-14 16:32 ` Jeff Moyer
2014-11-14 16:39 ` Dave Jones
2014-11-14 16:51 ` Jeff Moyer
2014-11-14 18:46 ` Milosz Tanski
[not found] ` <20141114163912.GA23769-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-11-14 18:45 ` Milosz Tanski
2014-11-14 18:52 ` Jeff Moyer
[not found] ` <cover.1415636409.git.milosz-B5zB6C1i6pkAvxtiuMwx3w@public.gmane.org>
2014-11-24 9:53 ` Christoph Hellwig
2014-11-25 23:01 ` Andrew Morton
2014-12-02 22:17 ` Milosz Tanski
2014-12-02 22:42 ` Andrew Morton [this message]
2014-12-03 9:10 ` Volker Lendecke
2014-12-03 16:48 ` Milosz Tanski
[not found] ` <CANP1eJGVyBOt1rQ8jA4tMrNGX5X61-UWbVy6kKj_ByeTqAEOBQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-12-04 23:11 ` Andrew Morton
2014-12-05 8:17 ` Volker Lendecke
2015-01-21 14:55 ` Milosz Tanski
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=20141202144200.a4ca81a46a43563a8874fd8e@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=Volker.Lendecke@sernet.de \
--cc=hch@infradead.org \
--cc=jmoyer@redhat.com \
--cc=linux-aio@kvack.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=milosz@adfin.com \
--cc=mtk.manpages@gmail.com \
--cc=tj@kernel.org \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/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).