mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: 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 16:15:08 +0400	[thread overview]
Message-ID: <20080624121508.GB15368@2ka.mipt.ru> (raw)
In-Reply-To: <E1KB7E3-0001Lf-K4@pomaz-ex.szeredi.hu>

On Tue, Jun 24, 2008 at 02:02:19PM +0200, Miklos Szeredi (miklos@szeredi.hu) wrote:
> > Maybe not that great if mark all readahead pages as, well, readahead,
> > and do the same for readpage (essnetially it is the same).
> 
> It isn't that easy.  Readahead (->readpages()) is best effort, and is
> allowed to not bring the page uptodate, since it will be retried with
> ->readpage().  I don't know whether any filesystems actually do that,
> but it's allowed nonetheless.

Yes, there is such filesystem :)
It is quite useful for network FS, since it does not bother to wait until
pages are in the cache and can try next request. Anyone who scheduled
readahead has full control over that pages and is allowed to set/clear
whatever flags it want (pages are locked), so it would be a great win to
set page as being read and unlocked. It can be a policy to clear read
bit when page is evicted from the cache by failed readahead/readpage(s).

> > > What's the use case where it matters that splice-in should not block
> > > on the read?
> > 
> > To be able to transfer what was already read?
> 
> That needs the consumer to be non-blocking...
> 
> Umm, one more reason why the ->confirm() stuff is currently busted:
> pipe_read() will block on such a buffer even if pipe file is marked
> O_NONBLOCK.  Fixing that would take a hell of a lot of added
> complexity in pipe_poll(), etc...

Yes, nonblocking splice is tricky and it covers only half of the users.

-- 
	Evgeniy Polyakov

  reply	other threads:[~2008-06-24 12:17 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
2008-06-21 15:46 ` [rfc patch 2/4] splice: remove steal from pipe_buf_operations 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
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 [this message]
2008-06-24 12:16           ` Nick Piggin
2008-06-24 12:22             ` Jens Axboe
2008-06-24 13:00             ` Miklos Szeredi
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
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=20080624121508.GB15368@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=jens.axboe@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=miklos@szeredi.hu \
    --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

all inboxes | Powered by JetHome®