Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965274AbbENUI0 (ORCPT ); Thu, 14 May 2015 16:08:26 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45983 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965246AbbENUIY (ORCPT ); Thu, 14 May 2015 16:08:24 -0400 Date: Thu, 14 May 2015 13:08:23 -0700 From: Andrew Morton To: Shreyas B Prabhu Cc: Steven Rostedt , 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 Message-Id: <20150514130823.4502e151e0e31321a114edcd@linux-foundation.org> In-Reply-To: <5553017A.2080905@linux.vnet.ibm.com> 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> <5553017A.2080905@linux.vnet.ibm.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1411 Lines: 32 On Wed, 13 May 2015 13:17:06 +0530 Shreyas B Prabhu 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(). -- 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/