From: Pavel Emelyanov <xemul@parallels.com>
To: <lsf-pc@lists.linux-foundation.org>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Linux MM <linux-mm@kvack.org>
Subject: [LSF/MM TOPIC] Pipe + splice problems
Date: Thu, 30 Jan 2014 11:46:42 +0400 [thread overview]
Message-ID: <52EA0362.8010803@parallels.com> (raw)
Hi,
While working on the checkpoint-restore project and looking at
what other Parallels people do with FUSE, I have met several
drawbacks of pipes. I admit, that most of them are well known for
years, but would like to summarize them and refresh the topic.
So the major problems are
* Pipe as page buffer lacks the random access feature
In FUSE-based FS-es like CEPH or Gluster with complex internal
data flows it's common case when data arrive in pipe, but FS
is willing to forward the pages from pipe tail into one descriptor
while keeping those from head in memory waiting for unblocked
another. Pipes do not allow this.
* Pipe's locking is one big mutex
For pipes with more than one page in buffers this results in
readers-vs-writers contention and, subsequently, pipe works
slower than a UNIX socket
* The pipe->mem vmsplice always copies data
There are cases in C/R when we have pages in pipes that cane
be mapped in tasks' address spaces, but vmslice doesn't allow
for that.
* No pipe -> AIO splicing
The pipe -> FS always goes through page cache, while AIO is
more preferable in some scenarios
* No fallocate analogue for pipe
People report many calls to __alloc_page in profiling logs when
heavily working with pipes
And a couple of minor issues
* Pipe requires 2 FDs to work with
With this using pipe as generic page-buffer is difficult due to
nr_files limitation.
* No sendpage for UNIX sockets results in pipe->unix data copy
Thanks,
Pavel
reply other threads:[~2014-01-30 7:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=52EA0362.8010803@parallels.com \
--to=xemul@parallels.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lsf-pc@lists.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;
as well as URLs for NNTP newsgroup(s).