From: Peter Zijlstra <peterz@infradead.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC] ftrace / perf 'recursion'
Date: Wed, 17 Aug 2016 16:57:09 +0200 [thread overview]
Message-ID: <20160817145709.GS30192@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20160817102559.726742bf@gandalf.local.home>
On Wed, Aug 17, 2016 at 10:25:59AM -0400, Steven Rostedt wrote:
> > > Also, it will prevent any tracing of NMIs that occur in there.
> >
> > It should not, see how I only mark the IRQ bit, not the NMI bit.
>
> Ah, I didn't look deep at what you set there. Maybe that would work.
> Still pretty hacky.
Sure :-)
> > > I would really like to keep this fix within perf if possible. If
> > > anything, the flag should just tell the perf function handler not to
> > > trace, this shouldn't stop all function handlers.
> >
> > Well, my thinking was that there's a reason most of irq_work is already
> > notrace. kernel/irq_work.c has CC_FLAGS_FTRACE removed. That seems to
> > suggest that tracing irq_work is a problem.
>
> Well, you were the one that added that ;-)
OK, I suppose I can do the same for perf only, which is basically the
first patch on this thread. And then remove the notrace muck for
irq_work.c.
> Are you calling a signal to userspace via the irq work? Maybe we should
> have a kernel thread that does that instead. That way, the irq works
> can be suspended until the kernel thread gets to run. Then even though
> the waking of the thread will cause more events, it will be spaced out
> enough not to cause an irq work storm.
Nah, that'd wreck the desired semantics. We could maybe use a task_work
for the signal cruft though, and only generate the signal on the return
to userspace. But I'm not sure that will cure the problem.
We'd still need the irq_work to wake tasks stuck in poll() and friends.
And once we're over the watermark, every new event will trigger that
wakeup, and the wakeup will generate a new event etc..
next prev parent reply other threads:[~2016-08-17 14:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-17 9:19 [RFC] ftrace / perf 'recursion' Peter Zijlstra
2016-08-17 10:33 ` Peter Zijlstra
2016-08-17 10:57 ` Peter Zijlstra
2016-08-17 13:49 ` Steven Rostedt
2016-08-17 14:06 ` Peter Zijlstra
2016-08-17 14:25 ` Steven Rostedt
2016-08-17 14:57 ` Peter Zijlstra [this message]
2016-08-17 15:04 ` 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=20160817145709.GS30192@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.