From: Ingo Molnar <mingo@kernel.org>
To: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
linux-kernel@vger.kernel.org,
Frederic Weisbecker <fweisbec@gmail.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Mike Galbraith <efault@gmx.de>,
Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH 3/3] perf record: mmap output file
Date: Wed, 16 Oct 2013 09:11:19 +0200 [thread overview]
Message-ID: <20131016071119.GE22509@gmail.com> (raw)
In-Reply-To: <525D6A6C.3090208@gmail.com>
* David Ahern <dsahern@gmail.com> wrote:
> On 10/15/13 10:06 AM, Ingo Molnar wrote:
> > splice() is very fast and should be able to process a lot of pages in
> > one go, so the feedback loop should be pretty weak. mmap() triggers
> > kernel code as well, every time we run out of the 64 MB window we got
> > to remap it, right?
>
>
> Yes, 1 mmap, 1 munmap for every 64MB. Compare to the write() case which
> calls write() for each mmap each time through the mmap_read loop.
>
> I am conjecturing that splice would follow the write model in the sense
> of a ring buffer has N bytes, call splice to copy the data from the ring
> buffer to the file. So, splice saves on the memcpy, but not the
> syscalls.
Well, splice can be 64 MB granular as well - but it depends on how
buffered the pipes are (splice always uses pipes to shuffle around pages).
It's possible to have pipes with larger buffering - see F_SETPIPE_SZ. The
current limit (for unprivileged users?) is:
fs/pipe.c:unsigned int pipe_max_size = 1048576;
[But I haven't actually used this to increase splice() size yet.]
Thanks,
Ingo
next prev parent reply other threads:[~2013-10-16 7:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-09 3:26 [PATCH 0/3] perf trace enhancements David Ahern
2013-10-09 3:26 ` [PATCH 1/3] perf util: Add findnew method to intlist - v2 David Ahern
2013-10-15 5:32 ` [tip:perf/core] perf util: Add findnew method to intlist tip-bot for David Ahern
2013-10-09 3:26 ` [PATCH 2/3] perf trace: Add summary option to dump syscall statistics David Ahern
2013-10-09 13:16 ` Jiri Olsa
2013-10-15 5:32 ` [tip:perf/core] " tip-bot for David Ahern
2013-10-09 3:26 ` [PATCH 3/3] perf record: mmap output file David Ahern
2013-10-09 5:59 ` Ingo Molnar
2013-10-15 14:04 ` David Ahern
2013-10-15 14:32 ` Arnaldo Carvalho de Melo
2013-10-15 14:38 ` Peter Zijlstra
2013-10-15 15:27 ` Ingo Molnar
2013-10-15 15:29 ` Peter Zijlstra
2013-10-15 15:30 ` David Ahern
2013-10-15 16:06 ` Ingo Molnar
2013-10-15 16:16 ` David Ahern
2013-10-16 7:11 ` Ingo Molnar [this message]
2013-10-15 16:37 ` Peter Zijlstra
2013-10-09 7:14 ` Mike Galbraith
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=20131016071119.GE22509@gmail.com \
--to=mingo@kernel.org \
--cc=acme@ghostprotocols.net \
--cc=dsahern@gmail.com \
--cc=efault@gmx.de \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.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