From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: David Howells <dhowells@redhat.com>
Cc: David Ahern <dsahern@gmail.com>,
netdev@vger.kernel.org, linux-afs@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] udp: Add tracepoints to monitor skbs going in and out of a UDP socket
Date: Thu, 4 Oct 2018 19:03:18 -0700 [thread overview]
Message-ID: <20181005020316.7cqlcfkedhamwhtt@ast-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <5213.1538695482@warthog.procyon.org.uk>
On Fri, Oct 05, 2018 at 12:24:42AM +0100, David Howells wrote:
>
> As for kprobes: spots, plural. Using kprobes involves installing breakpoint
> instructions and taking traps and would seem to require using printk for the
> output, which would affect the timings and potentially affect the situation,
> especially given the sheer amount of traces produced. Note that one of these
> was in an interrupt handler, which is possibly not the best place to be taking
> an illegal instruction trap.
>
> Using kprobes gets worse too. In my case, the source code and the build tree
> aren't on the test machine, which I understand would be a requirement - and
there is quite a bit of misunderstanding in the above two paragraphs about kprobes.
Sounds like it influences odd design choices with tracepoints.
- kprobes at the top of the function don't use traps and they've been
optimized over the years to have very low overhead
- trace_printk is using the same mechanism as tracepoint prints
- both trace_printk and tracepoints can affect timing
- kprobes and trace_printk work well out of irq handler. They work out of NMI too
- build tree doesn't need to be present to use kprobes
perf, bcc and others tools have user friendly (arguable of course) interfaces
for kprobes.
next prev parent reply other threads:[~2018-10-05 2:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-04 8:30 [PATCH net-next] udp: Add tracepoints to monitor skbs going in and out of a UDP socket David Howells
2018-10-04 16:36 ` David Ahern
2018-10-04 16:54 ` David Howells
2018-10-04 17:19 ` Alexei Starovoitov
2018-10-04 23:24 ` David Howells
2018-10-05 2:03 ` Alexei Starovoitov [this message]
2018-10-05 6:46 ` David Howells
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=20181005020316.7cqlcfkedhamwhtt@ast-mbp.dhcp.thefacebook.com \
--to=alexei.starovoitov@gmail.com \
--cc=dhowells@redhat.com \
--cc=dsahern@gmail.com \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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