From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754082AbbEMQVv (ORCPT ); Wed, 13 May 2015 12:21:51 -0400 Received: from smtprelay0141.hostedemail.com ([216.40.44.141]:46939 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752183AbbEMQVu (ORCPT ); Wed, 13 May 2015 12:21:50 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 50,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::,RULES_HIT:41:355:379:541:599:800:960:966:967:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2194:2196:2199:2200:2393:2525:2553:2560:2563:2682:2685:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3873:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4250:4362:4385:5007:6261:7862:7875:9025:10004:10400:10450:10455:10848:10967:11026:11232:11473:11658:11914:12043:12438:12517:12519:12555:12740:13069:13311:13357:14096:14097:19904:19999:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: month29_fc9fdf9c024b X-Filterd-Recvd-Size: 2453 Date: Wed, 13 May 2015 12:21:47 -0400 From: Steven Rostedt To: "Shreyas B. Prabhu" Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, preeti@linux.vnet.ibm.com, paulmck@linux.vnet.ibm.com Subject: Re: [PATCH] tracing: Add comments explaining cpu online filter for trace events Message-ID: <20150513122147.4ead9f07@gandalf.local.home> In-Reply-To: <1431533263-5139-1-git-send-email-shreyas@linux.vnet.ibm.com> References: <1431533263-5139-1-git-send-email-shreyas@linux.vnet.ibm.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; 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 On Wed, 13 May 2015 21:37:43 +0530 "Shreyas B. Prabhu" wrote: > trace_mm_page_pcpu_drain, trace_kmem_cache_free, trace_mm_page_free > and trace_tlb_flush can be potentially called from an offlined cpu. > Since trace points use RCU and RCU should not be used from offlined > cpus, we have checks to filter out such calls. Add comments to explain > this. > > Signed-off-by: Shreyas B. Prabhu > --- > This applies on top of patches posted here: > https://lkml.org/lkml/2015/5/8/527 > > include/trace/events/kmem.h | 15 +++++++++++++++ > include/trace/events/tlb.h | 5 +++++ > 2 files changed, 20 insertions(+) > > diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h > index 6cd975f..9883f2f 100644 > --- a/include/trace/events/kmem.h > +++ b/include/trace/events/kmem.h > @@ -146,6 +146,11 @@ DEFINE_EVENT_CONDITION(kmem_free, kmem_cache_free, > > TP_ARGS(call_site, ptr), > > + /* > + * This trace can be potentially called from an offlined cpu. > + * Since trace points use RCU and RCU should not be used from > + * offline cpus, filter such calls out. > + */ > TP_CONDITION(cpu_online(smp_processor_id())) > ); > Thanks for the comments, but can't these still be called with preemption enabled. What happens when CONFIG_DEBUG_PREEMPT is set and you enable these tracepoints. Wont it trigger a warning about smp_processor_id() being used in preemptible code? -- Steve