From: "H. Peter Anvin" <hpa@zytor.com>
To: Seiji Aguchi <seiji.aguchi@hds.com>,
Steven Rostedt <rostedt@goodmis.org>
Cc: "x86@kernel.org" <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Thomas Gleixner (tglx@linutronix.de)" <tglx@linutronix.de>,
"'mingo@elte.hu' (mingo@elte.hu)" <mingo@elte.hu>,
"Borislav Petkov (bp@alien8.de)" <bp@alien8.de>,
Satoru Moriya <satoru.moriya@hds.com>,
"dle-develop@lists.sourceforge.net"
<dle-develop@lists.sourceforge.net>,
"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
"Luck, Tony (tony.luck@intel.com)" <tony.luck@intel.com>,
"Paul E. McKenney" <paulmck@us.ibm.com>
Subject: RE: [PATCH v9 3/3] trace,x86: code-sharing between non-trace and trace irq handlers
Date: Fri, 15 Feb 2013 21:39:56 -0800 [thread overview]
Message-ID: <72465757-1907-4272-9950-36ac41898106@email.android.com> (raw)
In-Reply-To: <A5ED84D3BB3A384992CBB9C77DEDA4D414A9A312@USINDEM103.corp.hds.com>
Fair enough. Sounds good.
Seiji Aguchi <seiji.aguchi@hds.com> wrote:
>> > How important is it that the tracepoint is *inside* the enter/exit
>> > handling? If not, it would be simpler to just do:
>> >
>> > smp_trace_irq_handler()
>> > {
>> > trace_irq_entry();
>> > smp_irq_handler();
>> > trace_irq_exit();
>> > }
>> >
>> > ... which seems a bit cleaner. If this isn't possible, then this
>> > patch is fine, but please add to the patch description why the
>simple
>> > wrapper isn't doable.
>>
>> The problem is with irq_enter/exit() being called. They must be
>called before trace_irq_enter/exit(), because of the rcu_irq_enter()
>> must be called before any tracepoints are used, as tracepoints use
>rcu to synchronize.
>>
>
>I tried to place tracepoints outside the enter/exit handling. But it
>didn't work because of the rcu_irq_enter().
>
>> Now perhaps we could do this and have trace_irq_entry().
>>
>> Not only that, the tracepoint callbacks expect irq_enter() to already
>be called.
>>
>> Hmm, if irq_enter() can nest, which I think it can, perhaps we can
>call
>> irq_enter() first. I'm not sure if that will screw up the second
>> irq_entry() inside smp_irq_handler().
>>
>> smp_trace_irq_hander()
>> {
>> irq_entry();
>> trace_irq_entry();
>> smp_irq_handler();
>> trace_irq_exit();
>> irq_exit();
>> }
>
>If irq_enter() is nested, it may have a time penalty because it has to
>check if it was already called or not.
>It doesn't satisfy a goal of this patch.
>Therefore, I think current coding is reasonable.
>
>I will update the patch description.
>
>Seiji
--
Sent from my mobile phone. Please excuse brevity and lack of formatting.
prev parent reply other threads:[~2013-02-16 5:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-04 22:50 Seiji Aguchi
2013-02-16 0:13 ` H. Peter Anvin
2013-02-16 1:25 ` Steven Rostedt
2013-02-16 5:18 ` Seiji Aguchi
2013-02-16 5:39 ` H. Peter Anvin [this message]
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=72465757-1907-4272-9950-36ac41898106@email.android.com \
--to=hpa@zytor.com \
--cc=bp@alien8.de \
--cc=dle-develop@lists.sourceforge.net \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulmck@us.ibm.com \
--cc=rostedt@goodmis.org \
--cc=satoru.moriya@hds.com \
--cc=seiji.aguchi@hds.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@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
all inboxes | Powered by JetHome®