Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758436Ab0GUN7e (ORCPT ); Wed, 21 Jul 2010 09:59:34 -0400 Received: from charlotte.tuxdriver.com ([70.61.120.58]:58050 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750719Ab0GUN7d (ORCPT ); Wed, 21 Jul 2010 09:59:33 -0400 Date: Wed, 21 Jul 2010 09:56:54 -0400 From: Neil Horman To: KOSAKI Motohiro Cc: Koki Sanagi , 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 Message-ID: <20100721135654.GE21259@hmsreliant.think-freely.org> References: <4C469A41.4020807@jp.fujitsu.com> <20100721111419.GB21259@hmsreliant.think-freely.org> <20100721215836.86F9.A69D9226@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100721215836.86F9.A69D9226@jp.fujitsu.com> User-Agent: Mutt/1.5.20 (2009-08-17) X-Spam-Score: -2.9 (--) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2532 Lines: 54 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? Neil > > > -- > To unsubscribe from this list: send the line "unsubscribe netdev" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/