lkml.org 
[lkml]   [2015]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RESEND 0/3] tracing/mm: Fix suspicious rcu_dereference_check() usage warnings
On Wed, 13 May 2015 13:17:06 +0530 Shreyas B Prabhu <shreyas@linux.vnet.ibm.com> wrote:

> >>> + TP_CONDITION(cpu_online(smp_processor_id())),
> >>
> >> Are we sure these can't generate check_preemption_disabled() warnings?
> >> Is there some reason why all these calls always occur with preemption
> >> disabled?
> >
> > Good catch. I don't think the code does.
> >
> > Now, I'm not sure if we should just add a raw_smp_processor_id(). The
> > idea is just to make sure that the CPU we are running on is online,
> > because it is possible to call theses trace points when the CPU is
> > going offline. If that happens, then there's a race with RCU.
> >
> > Since a task can not be migrated to an offline CPU, we don't need to
> > worry about the cpu_online(smp_processor_id()) returning a false
> > positive. A false negative would just skip a tracepoint, but I'm not
> > sure that is possible either.
> >
> > In any case, comments should also be added to why the condition is
> > there.
> >
> I'll send a patch adding the comments.

Please also confirm that these tracepoints cannot be called
from preemptible contexts. Or switch to raw_smp_processor_id().


\
 
 \ /
  Last update: 2015-05-14 22:21    [W:0.069 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site