netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hagen Paul Pfeifer <hagen@jauu.net>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: "Frank Ch. Eigler" <fche@elastic.org>,
	Satoru Moriya <satoru.moriya@hds.com>,
	David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"tgraf@infradead.org" <tgraf@infradead.org>,
	"stephen.hemminger@vyatta.com" <stephen.hemminger@vyatta.com>,
	"eric.dumazet@gmail.com" <eric.dumazet@gmail.com>,
	Seiji Aguchi <seiji.aguchi@hds.com>,
	fche@sourceware.org, mathieu.desnoyers@polymtl.ca,
	rostedt@goodmis.org
Subject: Re: [PATCH v2 0/2] Tracepoint for tcp retransmission
Date: Sun, 5 Feb 2012 21:04:29 +0100	[thread overview]
Message-ID: <20120205200428.GB2816@nuttenaction> (raw)
In-Reply-To: <20120205191708.GA5337@neilslaptop.think-freely.org>

* Neil Horman | 2012-02-05 14:17:08 [-0500]:

>Generally the fact that probe points may shift underneath a script between
>kernels.  While its often ok, theres no guaranteed fixed set of probe points.
>While it often works, theres always the possibility that functional changes,
>even if they don't reults in behavioral changes to userspace, require re-working
>of stap scripts.  Its not the sort of thing that works will for people trying to
>build applications.

Hey Neil, I though about this more deeply. In my first iteration I had the
same answer. But IMHO if you think about this more deeply, I think this is not
a scalable approach (implementing in userspace as systemtap scripts compared
to implement them in kernelspace (tracepoints). Why? Because at a deep TCP
level the API (and thus the context) is not static and the meaning of return
values (or arguments) change over time. No matter _where_ it is implemented or
coded.

Lets imaging the following (I construct one example, but this may universal):
imagine we have two retransmission functions, one for RTO triggered
retransmission and one for dup-ack fast-retransmission. Both functions where
instrumented as tracepoints for years. After some years someone say "hey both
functions are similar, lets fix this and make one function". What should
happened with the tracepoints? Should they merged into one? What should be the
name of the tracepoint?

In the end you will end up fixing userspace analysis tools as well! IMHO there
is - in my opinion - no clean way to add tracepoints and think you are free of
maintaining the whole chain, from kernelspace to userspace.

Only "stable" in kernel API's may be a candidate for tracepoints (like kmalloc
and friends). Highly dynamic and often changed code not.

The biggest advantage from tracepoints is that the function is "annotated"
with something like "this is a tracepoint, please be nice and don't break the
behavioral meaning of this function". On the other side this is also a
disadvantage because it elevates a kernel function to a "userspace API": Tools
will start using this tracepoint, you may end up in a situation where you
can't change/delete tracepoints.

Hagen

  reply	other threads:[~2012-02-05 20:04 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-20 18:07 [PATCH v2 0/2] Tracepoint for tcp retransmission Satoru Moriya
2012-01-20 18:08 ` [PATCH v2 1/2] tcp: refactor tcp_retransmit_skb() for a single return point Satoru Moriya
2012-01-20 18:09 ` [PATCH v2 2/2] tcp: add tracepoint for tcp retransmission Satoru Moriya
2012-01-20 18:50 ` [PATCH v2 0/2] Tracepoint " David Miller
2012-02-03 21:47   ` Satoru Moriya
2012-02-04  4:40     ` Yuchung Cheng
2012-02-06 18:32       ` Satoru Moriya
2012-02-04 14:28     ` Neil Horman
2012-02-04 15:58       ` Hagen Paul Pfeifer
2012-02-04 20:09         ` Neil Horman
2012-02-05 12:53           ` Frank Ch. Eigler
2012-02-05 19:17             ` Neil Horman
2012-02-05 20:04               ` Hagen Paul Pfeifer [this message]
2012-02-05 21:48                 ` David Miller
2012-02-06  1:32                 ` Neil Horman
2012-02-06 15:20                   ` Frank Ch. Eigler
2012-02-06 15:24                     ` Eric Dumazet
2012-02-06 15:38                       ` Neil Horman
2012-02-06 15:53                     ` Neil Horman
2012-02-06 16:18                       ` Steven Rostedt
2012-02-06 17:02                         ` Eric Dumazet
2012-02-06 17:18                           ` Steven Rostedt
2012-02-06 16:21                       ` Frank Ch. Eigler
2012-02-06 18:21                       ` Satoru Moriya
2012-01-25 13:27 ` Hagen Paul Pfeifer
2012-01-25 14:44   ` Eric Dumazet
2012-01-26 18:51     ` David Miller
2012-02-03 20:31     ` Satoru Moriya
2012-02-03 20:43   ` Satoru Moriya
2012-02-03 20:55     ` Hagen Paul Pfeifer

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=20120205200428.GB2816@nuttenaction \
    --to=hagen@jauu.net \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=fche@elastic.org \
    --cc=fche@sourceware.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=rostedt@goodmis.org \
    --cc=satoru.moriya@hds.com \
    --cc=seiji.aguchi@hds.com \
    --cc=stephen.hemminger@vyatta.com \
    --cc=tgraf@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;
as well as URLs for NNTP newsgroup(s).