mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Joel Fernandes <joelaf@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-team@android.com, Ingo Molnar <mingo@redhat.com>,
	Byungchul Park <byungchul.park@lge.com>,
	Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH 2/2] tracing: Add support for critical section events
Date: Wed, 6 Sep 2017 10:40:40 +0200	[thread overview]
Message-ID: <20170906084040.uhqibgnls36rdh2a@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAJWu+oo3JAA3OE_mx8RCb1YrTgfS2RdF8NN3UgtGa_9ASMOgWA@mail.gmail.com>

On Tue, Sep 05, 2017 at 09:35:11AM -0700, Joel Fernandes wrote:
> On Mon, Sep 4, 2017 at 11:52 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> > On Mon, Sep 04, 2017 at 08:26:13PM -0700, Joel Fernandes wrote:
> >
> >> Apologies, I meant (without the "off"):
> >>
> >> subsystem: atomic_section
> >> events:
> >>   irqs_disable
> >>   irqs_enable
> >>   preempt_disable
> >>   preempt_enable
> >>
> >> and additionally (similar to what my patch does):
> >>   preemptirq_enable
> >>   preemptirq_disable
> >>
> >
> > What do you need the last for?
> 
> The last 2 events above behave as 'disable' means either preempt or
> irq got disabled, and 'enable' means *both* preempt and irq are
> enabled (after either one of them was disabled).
> 
> This has the advantage of not generating events when we're already in
> an atomic section when using these events, for example acquiring spin
> locks in an interrupt handler might increase the preempt count and
> generate 'preempt_disable' events, but not preemptirq_disable events.
> This has the effect of reducing the spam in the traces when all we
> care about is being in an atomic section or not. These events happen a
> lot so to conserve space in the trace buffer, the user may want to
> just enable the latter 2 events. Does that sound Ok to you?

Hurm,... how about placing a filter on the other 4, such that we only
emit the event on 0<->x state transitions? IIRC tracing already has
filter bits and eBPF bits on that allow something like that.

That avoids having to introduce more tracepoints and gets you the same
results.

  reply	other threads:[~2017-09-06  8:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-03  8:50 [PATCH 0/2] tracing: Add critical section event support Joel Fernandes
2017-09-03  8:50 ` [PATCH 1/2] tracing: irqsoff: Move code under tracer config options Joel Fernandes
2017-09-03  8:50 ` [PATCH 2/2] tracing: Add support for critical section events Joel Fernandes
2017-09-04  7:56   ` Peter Zijlstra
2017-09-04 19:04     ` Joel Fernandes
2017-09-04 19:44       ` Peter Zijlstra
2017-09-04 23:34         ` Steven Rostedt
2017-09-05  0:54           ` Joel Fernandes
2017-09-05  3:26             ` Joel Fernandes
2017-09-05  6:52               ` Peter Zijlstra
2017-09-05 16:35                 ` Joel Fernandes
2017-09-06  8:40                   ` Peter Zijlstra [this message]
2017-09-07  0:22                     ` Joel Fernandes

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=20170906084040.uhqibgnls36rdh2a@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=byungchul.park@lge.com \
    --cc=joelaf@google.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tj@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®