From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752643AbdC2C7E (ORCPT ); Tue, 28 Mar 2017 22:59:04 -0400 Received: from smtprelay0012.hostedemail.com ([216.40.44.12]:59901 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752206AbdC2C7B (ORCPT ); Tue, 28 Mar 2017 22:59:01 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2194:2199:2393:2553:2559:2562:2736:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3874:5007:6261:7875:7903:8660:10004:10400:10848:10967:11026:11232:11658:11914:12296:12438:12740:12760:12895:13069:13148:13230:13311:13357:13439:14096:14097:14181:14659:14721:21080:21433:30054:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: house02_2f3a6485f8d01 X-Filterd-Recvd-Size: 2509 Date: Tue, 28 Mar 2017 22:58:43 -0400 From: Steven Rostedt To: Namhyung Kim Cc: Ingo Molnar , Masami Hiramatsu , LKML , kernel-team@lge.com Subject: Re: [PATCH 1/4] ftrace: Fix function pid filter on instances Message-ID: <20170328225843.4ed16b0f@grimm.local.home> In-Reply-To: <20170329024227.GC19448@sejong> References: <20170329014625.19346-1-namhyung@kernel.org> <20170329014625.19346-2-namhyung@kernel.org> <20170328220841.6823958d@grimm.local.home> <20170329022037.GA19448@sejong> <20170328222855.78af0d53@grimm.local.home> <20170329024227.GC19448@sejong> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; 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, 29 Mar 2017 11:42:27 +0900 Namhyung Kim wrote: > On Tue, Mar 28, 2017 at 10:28:55PM -0400, Steven Rostedt wrote: > > On Wed, 29 Mar 2017 11:20:37 +0900 > > Namhyung Kim wrote: > > > > > > > > Actually, if this is called after event_trace_del_tracer(), the tr is > > > > already invisible and nothing new should change. > > > > > > I don't follow. After event_trace_del_tracer(), the tr is invisible > > > from the probe of event tracing but still is visible from the probe of > > > function tracing, right? > > > > Well, nothing should be able to get to the set_ftrace_filter file when > > there. Because of the tr->ref count. But keeping the lock is safer > > regardless, and it's not a fast path, so the extra overhead if the lock > > isn't needed is no big deal. > > Oh, I meant if a pid filter was already set when removing the > instance. Function filters should be inactive since function tracer > was finished (via tracing_set_nop), but the probe on sched_switch > event (for pid filter) is still active and references the tr. > I think we are talking about two different things. I was simply talking about the need to take the ftrace_lock or not in the clear_ftrace_pids() call here. I don't think we have to, because nothing should be in contention with it at that point. But it doesn't hurt to take it. -- Steve