Re: [PATCH RT 2/2] ftrace: fix elevated preempt_count in wakeup-tracer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2008-08-19 at 05:19 -0400, Gregory Haskins wrote:
> Suggested by Steve Rostedt to fix an observed "+1" in the preempt-count
> 
> Signed-off-by: Gregory Haskins <ghaskins@xxxxxxxxxx>
> ---
> 
>  kernel/trace/trace_sched_wakeup.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/kernel/trace/trace_sched_wakeup.c b/kernel/trace/trace_sched_wakeup.c
> index c3a15bd..ae523fd 100644
> --- a/kernel/trace/trace_sched_wakeup.c
> +++ b/kernel/trace/trace_sched_wakeup.c
> @@ -70,7 +70,9 @@ wakeup_tracer_call(unsigned long ip, unsigned long parent_ip)
>  	if (task_cpu(wakeup_task) != cpu)
>  		goto unlock;
>  
> +	preempt_enable_no_resched_notrace();
>  	trace_function(tr, data, ip, parent_ip, flags);
> +	preempt_disable_notrace();

Is preempt_count > 1 at all times here?

If not, it might drop to 0 and any interrupt might cause preemption -
and its not obvious to me that that is actually correct.

Just asking, as neither the changelog nor the code fragment enlightens
me on the subject.

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux