mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Shreyas B Prabhu <shreyas@linux.vnet.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org, mingo@redhat.com,
	aneesh.kumar@linux.vnet.ibm.com, paulmck@linux.vnet.ibm.com,
	preeti@linux.vnet.ibm.com, mgorman@suse.de, namhyung@kernel.org,
	lizf@cn.fujitsu.com, acme@redhat.com
Subject: Re: [PATCH RESEND 0/3] tracing/mm: Fix suspicious rcu_dereference_check() usage warnings
Date: Thu, 14 May 2015 13:08:23 -0700	[thread overview]
Message-ID: <20150514130823.4502e151e0e31321a114edcd@linux-foundation.org> (raw)
In-Reply-To: <5553017A.2080905@linux.vnet.ibm.com>

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().

  reply	other threads:[~2015-05-14 20:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-08 17:20 Shreyas B. Prabhu
2015-05-08 17:20 ` [PATCH RESEND 1/3] tracing/mm: Don't trace kmem_cache_free on offline cpus Shreyas B. Prabhu
2015-05-08 17:20 ` [PATCH RESEND 2/3] tracing/mm: Don't trace mm_page_free " Shreyas B. Prabhu
2015-05-08 17:20 ` [PATCH RESEND 3/3] tracing/mm: Don't trace mm_page_pcpu_drain " Shreyas B. Prabhu
2015-05-12  7:29 ` [PATCH RESEND 0/3] tracing/mm: Fix suspicious rcu_dereference_check() usage warnings Shreyas B Prabhu
2015-05-12 20:03   ` Steven Rostedt
2015-05-12 20:36     ` Andrew Morton
2015-05-12 20:54       ` Steven Rostedt
2015-05-13  7:47         ` Shreyas B Prabhu
2015-05-14 20:08           ` Andrew Morton [this message]
2015-05-14 20:38             ` 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=20150514130823.4502e151e0e31321a114edcd@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=acme@redhat.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=preeti@linux.vnet.ibm.com \
    --cc=rostedt@goodmis.org \
    --cc=shreyas@linux.vnet.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®