netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: kosaki.motohiro@jp.fujitsu.com,
	Koki Sanagi <sanagi.koki@jp.fujitsu.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	davem@davemloft.net, kaneshige.kenji@jp.fujitsu.com,
	izumi.taku@jp.fujitsu.com, laijs@cn.fujitsu.com,
	scott.a.mcmillan@intel.com, rostedt@goodmis.org,
	eric.dumazet@gmail.com, fweisbec@gmail.com,
	mathieu.desnoyers@polymtl.ca
Subject: Re: [RFC PATCH v3 1/5] irq: add tracepoint to softirq_raise
Date: Fri, 23 Jul 2010 14:34:54 +0900 (JST)	[thread overview]
Message-ID: <20100723140656.88A2.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <20100721135654.GE21259@hmsreliant.think-freely.org>

> On Wed, Jul 21, 2010 at 10:01:34PM +0900, KOSAKI Motohiro wrote:
> > > > >>  #endif /*  _TRACE_IRQ_H */
> > > > >> diff --git a/kernel/softirq.c b/kernel/softirq.c
> > > > >> index 825e112..6790599 100644
> > > > >> --- a/kernel/softirq.c
> > > > >> +++ b/kernel/softirq.c
> > > > >> @@ -215,9 +215,9 @@ restart:
> > > > >>  			int prev_count = preempt_count();
> > > > >>  			kstat_incr_softirqs_this_cpu(h - softirq_vec);
> > > > >>  
> > > > >> -			trace_softirq_entry(h, softirq_vec);
> > > > >> +			trace_softirq_entry(h - softirq_vec);
> > > > >>  			h->action(h);
> > > > >> -			trace_softirq_exit(h, softirq_vec);
> > > > >> +			trace_softirq_exit(h - softirq_vec);
> > > > > 
> > > > > You're loosing information here by reducing the numbers of parameters in this
> > > > > tracepoint.  How many other tracepoint scripts rely on having both pointers
> > > > > handy?  Why not just do the pointer math inside your tracehook instead?
> > > > 
> > > > In __raise_softirq_irqoff macro there is no method to refer softirq_vec, so it
> > > > can't use softirq DECLARE_EVENT_CLASS as is.
> > > > Currently,  there is no script using softirq_entry or softirq_exit.
> > > > 
> > > That shouldn't matter, just pass in NULL for softirq_vec in
> > > __raise_softirq_irqoff as the second argument to the trace function.  You may
> > > need to fix up the class definition so that the assignment or printk doesn't try
> > > to dereference that pointer when its NULL, but thats easy enough, and it avoids
> > > breaking any other perf scripts floating out there.
> > 
> > please see 5 lines above. we already have 'h - softirq_vec' calculation in
> > this function. so, Sanagi-san's change don't makes any overhead.
> > 
> > So, if the overhead is zero, I'd prefer simplest tracepoint definition :)
> > 
> I never complained about performance here, I complained about information loss.
> You have a tracepoint that provides two arguments here, and you're eliminating
> one of them.  That will potentially break other users of this tracepoint.  I
> understand we don't normally care about that with tracepoints as much, but if we
> can avoid it, why don't we?

I see. I have no objection.

Thanks.

  reply	other threads:[~2010-07-23  5:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-20  0:43 [RFC PATCH v3 0/5] netdev: show a process of packets Koki Sanagi
2010-07-20  0:45 ` [RFC PATCH v3 1/5] irq: add tracepoint to softirq_raise Koki Sanagi
2010-07-20 11:04   ` Neil Horman
2010-07-21  6:57     ` Koki Sanagi
2010-07-21 11:14       ` Neil Horman
2010-07-21 13:01         ` KOSAKI Motohiro
2010-07-21 13:56           ` Neil Horman
2010-07-23  5:34             ` KOSAKI Motohiro [this message]
2010-07-22  8:41         ` Koki Sanagi
2010-07-20  0:46 ` [RFC PATCH v3 2/5] napi: convert trace_napi_poll to TRACE_EVENT Koki Sanagi
2010-07-20 11:09   ` Neil Horman
2010-07-21  7:00     ` Koki Sanagi
2010-07-21 11:24       ` Neil Horman
2010-07-20  0:47 ` [RFC PATCH v3 3/5] netdev: add tracepoints to netdev layer Koki Sanagi
2010-07-20 11:41   ` Neil Horman
2010-07-21  7:01     ` Koki Sanagi
2010-07-20  0:49 ` [RFC PATCH v3 4/5] skb: add tracepoints to freeing skb Koki Sanagi
2010-07-20  4:54   ` Eric Dumazet
2010-07-20  6:47     ` Koki Sanagi
2010-07-20 11:50   ` Neil Horman
2010-07-21  7:02     ` Koki Sanagi
2010-07-21 10:56       ` Neil Horman
2010-07-22  8:39         ` Koki Sanagi
2010-07-22 14:57           ` Neil Horman
2010-07-20  0:50 ` [RFC PATCH v3 5/5] perf:add a script shows a process of packet Koki Sanagi

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=20100723140656.88A2.A69D9226@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=izumi.taku@jp.fujitsu.com \
    --cc=kaneshige.kenji@jp.fujitsu.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=rostedt@goodmis.org \
    --cc=sanagi.koki@jp.fujitsu.com \
    --cc=scott.a.mcmillan@intel.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).