public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Harald Gustafsson <hgu1972@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Harald Gustafsson <harald.gustafsson@ericsson.com>,
	Song Yuan <song.yuan@ericsson.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: perf events over (net) console?
Date: Thu, 9 Sep 2010 15:07:23 +0200	[thread overview]
Message-ID: <20100909130723.GA20470@elte.hu> (raw)
In-Reply-To: <1284036453.402.11.camel@laptop>


* Peter Zijlstra <peterz@infradead.org> wrote:

> On Thu, 2010-09-09 at 14:31 +0200, Harald Gustafsson wrote:
> 
> > Sorry for being daft...
> 
> No worries, I'm sure we all qualify at times ;-)
> 
> > >> >
> > >> > You need a process context anyway to read the data and send it to
> > >> > whatever place you want it.
> > >> >
> > >> > Putting that in-kernel serves no purpose what so ever.
> > >>
> > >> But if we bring the splice support, that can be done with minimal
> > >> userspace noise. Plus that would work with the usual sockets but not
> > >> limited to that.
> > >
> > > Yes. If we can transform the data over the network without it touching
> > > disk, then that would be a sufficiently 'does not disturb other tasks'
> > > measurement method.
> > 
> > Thanks for the pointers to more information, and yes my thoughts was 
> > more about avoiding the data copy then avoiding any processing 
> > context at all.
> 
> Right, currently you get a single copy with mmap() + write(), once we 
> manage to fix splice() and actually provide perf-splice() you'd be 
> able to do zero-copy.

I think it would also be very useful to have some sort of tooling help 
for "low overhead/impact perf recording".

If there's a 'target box' and a different 'host box' (where most of 
development is done, etc.), then there might not be any NFS connection 
set up to make zero-copy file transfer easy. Doing it over ssh would add 
overhead.

One possible workflow would be to run this on the target/remote box:

  perf remote

And as long as that command is running there, it could be used from the 
development box (over a trusted local network), using something like:

  perf --remote <hostname> record sleep 60
  perf --remote <hostname> stat -a sleep 1

these would all do the measurements on the remote box, and the resulting 
perf.data would be created on the desktop box. Communication would be 
done via some well-known port.

etc.

An alternative implementation would be to drive this on the assumption 
that an ssh connection can be established with the target box - but 
followup high-volume data transfer would be done over an ordinary TCP 
connection.

I.e. the workflow would be even simpler, something like:

  perf --remote user@hostname record sleep 60
  perf --remote user@hostname stat -a sleep 1

Internally it would work by executing those commands on the remote box 
via ssh, and redirecting the output via a TCP connection. (some other 
details might be needed as well for splice to be usable in such a setup)

Would anyone be interested in having (and implementing ;-) this?

	Ingo

  reply	other threads:[~2010-09-09 13:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-09 11:06 perf events over (net) console? Harald Gustafsson
2010-09-09 11:19 ` Peter Zijlstra
2010-09-09 11:29   ` Frederic Weisbecker
2010-09-09 11:35     ` Peter Zijlstra
2010-09-09 11:40       ` Frederic Weisbecker
2010-09-09 11:40     ` Ingo Molnar
2010-09-09 12:31       ` Harald Gustafsson
2010-09-09 12:47         ` Peter Zijlstra
2010-09-09 13:07           ` Ingo Molnar [this message]
2010-09-09 13:21             ` Frederic Weisbecker
2010-09-09 14:41               ` Arnaldo Carvalho de Melo
2010-09-09 17:42                 ` Harald Gustafsson

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=20100909130723.GA20470@elte.hu \
    --to=mingo@elte.hu \
    --cc=acme@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=harald.gustafsson@ericsson.com \
    --cc=hgu1972@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=song.yuan@ericsson.com \
    /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