From: Miklos Szeredi <miklos@szeredi.hu>
To: nickpiggin@yahoo.com.au
Cc: miklos@szeredi.hu, jens.axboe@oracle.com,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, torvalds@linux-foundation.org
Subject: Re: [rfc patch 3/4] splice: remove confirm from pipe_buf_operations
Date: Tue, 24 Jun 2008 15:00:19 +0200 [thread overview]
Message-ID: <E1KB88B-0001Ts-Ht@pomaz-ex.szeredi.hu> (raw)
In-Reply-To: <200806242216.41548.nickpiggin@yahoo.com.au> (message from Nick Piggin on Tue, 24 Jun 2008 22:16:41 +1000)
> > > It's an unfortunate side effect of the read-ahead, I'd much rather just
> > > get rid of that. It _should_ behave like the non-ra case, when a page is
> > > added it merely has IO started on it. So we want to have that be
> > > something like
> > >
> > > if (!PageUptodate(page) && !PageInFlight(page))
> > > ...
> > >
> > > basically like PageWriteback(), but for read-in.
> >
> > OK it could be done, possibly at great pain. But why is it important?
>
> It has been considered, but adding atomic operations on these paths
> always really hurts. Adding something like this would basically be
> another at least 2 atomic operations that can never be removed again...
>
> Provided that you've done the sync readahead earlier, it presumably
> should be a very rare case to have to start new IO in the loop
> below, right? In which case, I wonder if we couldn't move that 2nd
> loop out of generic_file_splice_read and into
> page_cache_pipe_buf_confirm.
The problem with that second loop (which started this thing) is that
if a page is invalidated by the filesystem, then it doesn't redo the
lookup/read like the plain cached read does.
And that can't be done in page_cache_pipe_buf_confirm() at all.
> > What's the use case where it matters that splice-in should not block
> > on the read?
>
> It just makes it generally less able to pipeline IO and computation,
> doesn't it?
Maybe. I don't really see how splice might be used that would be
helped by this. Do you have a concrete example?
In fact I don't really know at all what splice is being used for
(other than the in kernel uses: nfsd, sendfile).
Thanks,
Miklos
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-06-24 13:00 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-21 15:46 [rfc patch 0/4] splice: cleanups and fixes Miklos Szeredi
2008-06-21 15:46 ` [rfc patch 1/4] splice: fix comment Miklos Szeredi, Miklos Szeredi
2008-06-21 15:46 ` [rfc patch 2/4] splice: remove steal from pipe_buf_operations Miklos Szeredi, Miklos Szeredi
2008-06-24 8:01 ` Jens Axboe
2008-06-24 8:50 ` Miklos Szeredi
2008-06-24 12:21 ` Nick Piggin
2008-06-21 15:46 ` [rfc patch 3/4] splice: remove confirm " Miklos Szeredi, Miklos Szeredi
2008-06-24 8:04 ` Jens Axboe
2008-06-24 8:54 ` Miklos Szeredi
2008-06-24 11:19 ` Jens Axboe
2008-06-24 11:36 ` Miklos Szeredi
2008-06-24 11:46 ` Evgeniy Polyakov
2008-06-24 12:02 ` Miklos Szeredi
2008-06-24 12:15 ` Evgeniy Polyakov
2008-06-24 12:16 ` Nick Piggin
2008-06-24 12:22 ` Jens Axboe
2008-06-24 13:00 ` Miklos Szeredi [this message]
2008-06-24 17:30 ` Linus Torvalds
2008-06-24 18:24 ` Miklos Szeredi
2008-06-24 18:31 ` Linus Torvalds
2008-06-24 19:05 ` Miklos Szeredi
2008-06-24 19:17 ` Linus Torvalds
2008-06-24 19:24 ` Miklos Szeredi
2008-06-24 19:26 ` Miklos Szeredi
2008-06-24 19:32 ` Miklos Szeredi
2008-06-24 19:47 ` Linus Torvalds
2008-06-24 20:06 ` Miklos Szeredi
2008-06-24 19:45 ` Linus Torvalds
2008-06-21 15:46 ` [rfc patch 4/4] splice: use do_generic_file_read() Miklos Szeredi, Miklos Szeredi
2008-06-24 8:05 ` Jens Axboe
2008-06-24 11:11 ` Miklos Szeredi
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=E1KB88B-0001Ts-Ht@pomaz-ex.szeredi.hu \
--to=miklos@szeredi.hu \
--cc=jens.axboe@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nickpiggin@yahoo.com.au \
--cc=torvalds@linux-foundation.org \
/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