This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH tracing/kprobes] kprobes: Disable booster when CONFIG_PREEMPT=y
- From: Peter Zijlstra <peterz at infradead dot org>
- To: Mathieu Desnoyers <compudj at krystal dot dyndns dot org>
- Cc: Masami Hiramatsu <mhiramat at redhat dot com>, Ingo Molnar <mingo at elte dot hu>, Thomas Gleixner <tglx at linutronix dot de>, Fr??d??ric Weisbecker <fweisbec at gmail dot com>, Steven Rostedt <rostedt at goodmis dot org>, lkml <linux-kernel at vger dot kernel dot org>, systemtap <systemtap at sources dot redhat dot com>, DLE <dle-develop at lists dot sourceforge dot net>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Jim Keniston <jkenisto at us dot ibm dot com>
- Date: Fri, 29 Jan 2010 18:15:38 +0100
- Subject: Re: [PATCH tracing/kprobes] kprobes: Disable booster when CONFIG_PREEMPT=y
- References: <4B5E476C.9030303@redhat.com> <20100127215531.24775.26807.stgit@dhcp-100-2-132.bos.redhat.com> <20100129092135.GE10878@elte.hu> <4B62F61D.5060203@redhat.com> <20100129170817.GA2283@Krystal>
On Fri, 2010-01-29 at 12:08 -0500, Mathieu Desnoyers wrote:
>
> If a task is set as stopped, and the preempted before calling schedule,
> can this result in a preempted task staying in that state for an
> arbitrary long period of time ? Or is there some mechanism prohibiting
> that in the scheduler ?
PREEMPT_ACTIVE does that:
preempt_schedule()
add_preempt_count(PREEMPT_ACTIVE);
schedule();
schedule()
if (prev->state && !(preempt_count() & PREEMPT_ACTIVE)) {
if (unlikely(signal_pending_state(prev->state, prev)))
prev->state = TASK_RUNNING;
else
deactivate_task(rq, prev, 1);
switch_count = &prev->nvcsw;
}