From: Peter Zijlstra <peterz@infradead.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] sched: Add preempt checks in preempt_schedule() code
Date: Mon, 21 Mar 2016 10:27:46 +0100 [thread overview]
Message-ID: <20160321092746.GR6344@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20160318130602.25f6c9cd@gandalf.local.home>
On Fri, Mar 18, 2016 at 01:06:02PM -0400, Steven Rostedt wrote:
> Now by breaking out the preempt off/on tracing into their own code:
> preempt_disable_check() and preempt_enable_check(), we can add these to
> the preempt_schedule() code. As preemption would then be disabled, even
> if they were to be traced by the function tracer, the disabled
> preemption would prevent the recursion.
> +static inline void preempt_disable_check(int val)
> +{
> + if (preempt_count() == val) {
> + unsigned long ip = get_parent_ip(CALLER_ADDR1);
> +#ifdef CONFIG_DEBUG_PREEMPT
> + current->preempt_disable_ip = ip;
> +#endif
> + trace_preempt_off(CALLER_ADDR0, ip);
> + }
> +}
> +static inline void preempt_enable_check(int val)
> +{
> + if (preempt_count() == val)
> + trace_preempt_on(CALLER_ADDR0, get_parent_ip(CALLER_ADDR1));
> +}
So no real objection to the patch except this naming.
It doesn't 'check', it does preempt-latency tracing. So could we rename
this to something like:
preempt_{dis,en}able_latency()
or somesuch?
next prev parent reply other threads:[~2016-03-21 9:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 17:06 [PATCH] sched: Add preempt checks in preempt_schedule() code Steven Rostedt
2016-03-19 4:10 ` Boqun Feng
2016-03-19 9:32 ` Boqun Feng
2016-03-21 9:27 ` Peter Zijlstra [this message]
2016-03-21 13:29 ` Steven Rostedt
2016-03-21 14:11 ` Peter Zijlstra
2016-03-21 14:35 ` Steven Rostedt
2016-03-21 14:42 ` Peter Zijlstra
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=20160321092746.GR6344@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--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.