Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754100AbbEMHrb (ORCPT ); Wed, 13 May 2015 03:47:31 -0400 Received: from e28smtp03.in.ibm.com ([122.248.162.3]:47942 "EHLO e28smtp03.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752602AbbEMHr3 (ORCPT ); Wed, 13 May 2015 03:47:29 -0400 Message-ID: <5553017A.2080905@linux.vnet.ibm.com> Date: Wed, 13 May 2015 13:17:06 +0530 From: Shreyas B Prabhu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: Steven Rostedt , Andrew Morton CC: 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 References: <1431105646-26558-1-git-send-email-shreyas@linux.vnet.ibm.com> <5551ABD6.9050007@linux.vnet.ibm.com> <20150512160351.4b5d5606@gandalf.local.home> <20150512133601.2f619efe74d08ed9281667d1@linux-foundation.org> <20150512165446.6daf5a4a@gandalf.local.home> In-Reply-To: <20150512165446.6daf5a4a@gandalf.local.home> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15051307-0009-0000-0000-00000564CCC1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1770 Lines: 56 On Wednesday 13 May 2015 02:24 AM, Steven Rostedt wrote: > On Tue, 12 May 2015 13:36:01 -0700 > Andrew Morton wrote: > >> On Tue, 12 May 2015 16:03:51 -0400 Steven Rostedt wrote: >> >>> On Tue, 12 May 2015 12:59:26 +0530 >>> Shreyas B Prabhu wrote: >>> >>>> Hi Steven, >>>> On closer look, there is no particular maintainer who picks changes to >>>> this file. Can you please pick these up? >>> >>> Perhaps Andrew Morton? >>> >>> No problem, I can take these too. >>> >> >> I grabbed them, thanks. >> Thanks Andrew. >>> + 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. Thanks, Shreyas -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/