netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: qdkevin.kou@gmail.com, netdev@vger.kernel.org,
	nhorman@tuxdriver.com, linux-sctp@vger.kernel.org
Subject: Re: [PATCH net-next] sctp: move trace_sctp_probe_path into sctp_outq_sack
Date: Thu, 26 Dec 2019 23:28:01 -0300	[thread overview]
Message-ID: <20191227022801.GI5058@localhost.localdomain> (raw)
In-Reply-To: <20191226.153835.1092744996447366504.davem@davemloft.net>

On Thu, Dec 26, 2019 at 03:38:35PM -0800, David Miller wrote:
> From: Kevin Kou <qdkevin.kou@gmail.com>
> Date: Fri, 27 Dec 2019 07:09:07 +0800
> 
> > 
> > 
> >>From: Kevin Kou <qdkevin.kou@xxxxxxxxx>
> >>Date: Thu, 26 Dec 2019 12:29:17 +0000
> >>
> >>> This patch is to remove trace_sctp_probe_path from the TP_fast_assign
> >>> part of TRACE_EVENT(sctp_probe) to avoid the nest of entry function,
> >>> and trigger sctp_probe_path_trace in sctp_outq_sack.
> >> ...
> >>
> >>Applied, but why did you remove the trace enabled check, just out of
> >>curiosity?
> > 
> > Actually, the check in trace_sctp_probe_path_enabled also done in
> > trace_sctp_probe_path according to the Macro definition, both check
> > if (static_key_false(&__tracepoint_##name.key)).
> 
> Indeed, thanks for the explanation.

It was duplicated, yes, but it was also a small optimization:

if (enabled) {
  for (X times) {
    if (enabled) {
    }
  }
}

So it wouldn't traverse the list if not needed.  But X is usually 1 or
2 and this list is already traversed multiple times in this code path.

  reply	other threads:[~2019-12-27  2:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-26 12:29 [PATCH net-next] sctp: move trace_sctp_probe_path into sctp_outq_sack Kevin Kou
2019-12-26 20:53 ` Marcelo Ricardo Leitner
2019-12-26 21:07 ` David Miller
2019-12-26 23:09 ` Kevin Kou
2019-12-26 23:38   ` David Miller
2019-12-27  2:28     ` Marcelo Ricardo Leitner [this message]
2019-12-27  2:47       ` Kevin Kou

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=20191227022801.GI5058@localhost.localdomain \
    --to=marcelo.leitner@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-sctp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=qdkevin.kou@gmail.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;
as well as URLs for NNTP newsgroup(s).