mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Joel Fernandes <joelaf@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-team@android.com
Subject: Re: [PATCH v6 2/2] tracing: Add support for preempt and irq enable/disable events
Date: Sat, 30 Sep 2017 05:08:17 -0400	[thread overview]
Message-ID: <20170930050817.2a0147ba@vmware.local.home> (raw)
In-Reply-To: <CAJWu+ooMB7pDu0xAkqwZBgBO67CFW6A4AXa3hbKo-oSh93t5=Q@mail.gmail.com>

On Mon, 25 Sep 2017 17:23:00 -0700
Joel Fernandes <joelaf@google.com> wrote:

> The trace_hardirqs_off API can be called even when IRQs are already
> off. This is unlike the trace_hardirqs_on which checks if IRQs are off
> (atleast from some callsites), here are the definitions just for
> reference [1]. I guess we could modify local_irq_disable and
> local_irq_save to check what the HW flags was before calling
> raw_local_irq_save and only then call trace_hardirqs_off if they were
> indeed on and now being turned off, but that adds complexity to it -
> also we have to then modify all the callsites from assembly code to
> conditionally call trace_hardirqs_on/off :(.
> 

> [1] http://elixir.free-electrons.com/linux/latest/source/include/linux/irqflags.h#L89

Yeah, I think the issue for the recursion is basically this:

#define local_irq_restore(flags)			\
	do {						\
		if (raw_irqs_disabled_flags(flags)) {	\
			raw_local_irq_restore(flags);	\
			trace_hardirqs_off();		\
		} else {				\
			trace_hardirqs_on();		\
			raw_local_irq_restore(flags);	\
		}					\
	} while (0)


Peter,

Is there any place where we would call local_irq_restore() when
interrupts are enabled?

-- Steve

  reply	other threads:[~2017-09-30  9:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-22  1:50 [PATCH v6 0/2] tracing: Add trace events for preemption and irq disable/enable Joel Fernandes
2017-09-22  1:50 ` [PATCH v6 1/2] tracing: Prepare to add preempt and irq trace events Joel Fernandes
2017-09-22  1:50 ` [PATCH v6 2/2] tracing: Add support for preempt and irq enable/disable events Joel Fernandes
2017-09-22  9:02   ` Peter Zijlstra
2017-09-22 18:28     ` Joel Fernandes
2017-09-25  8:34       ` Peter Zijlstra
2017-09-25 10:15         ` Steven Rostedt
2017-09-25 10:32           ` Peter Zijlstra
2017-09-25 10:52             ` Steven Rostedt
2017-09-25 22:57               ` Joel Fernandes
2017-09-26  2:47                 ` Steven Rostedt
2017-09-29  2:15                 ` Joel Fernandes
2017-09-26  0:23         ` Joel Fernandes
2017-09-30  9:08           ` Steven Rostedt [this message]
2017-10-02 19:23             ` Joel Fernandes
2017-10-02 19:33               ` Joel Fernandes
2017-10-02 19:37                 ` Steven Rostedt
2017-10-02 21:31                   ` Joel Fernandes
2017-09-22  3:11 ` [PATCH v6 0/2] tracing: Add trace events for preemption and irq disable/enable Steven Rostedt

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=20170930050817.2a0147ba@vmware.local.home \
    --to=rostedt@goodmis.org \
    --cc=joelaf@google.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@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

Powered by JetHome