From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757432AbcG0RaO (ORCPT ); Wed, 27 Jul 2016 13:30:14 -0400 Received: from smtprelay0176.hostedemail.com ([216.40.44.176]:59209 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757235AbcG0RaN (ORCPT ); Wed, 27 Jul 2016 13:30:13 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::::::::,RULES_HIT:41:355:379:421: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:2198:2199:2393:2553:2559:2562:2693:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4321:5007:6261:6742:7875:7903:8660:10004:10400:10450:10455:10848:10967:11026:11232:11658:11914:12043:12296:12438:12517:12519:12663:12740:13069:13148:13161:13229:13230:13311:13357:13439:14096:14097:14181:14659:14721:19904:19999:21080:21434:30054:30064:30090:30091,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,LFtime:4,LUA_SUMMARY:none X-HE-Tag: team89_58bba86d1892c X-Filterd-Recvd-Size: 2752 Date: Wed, 27 Jul 2016 13:30:08 -0400 From: Steven Rostedt To: Dave Hansen Cc: Janani Ravichandran , linux-mm@kvack.org, linux-kernel@vger.kernel.org, riel@surriel.com, akpm@linux-foundation.org, hannes@compxchg.org, vdavydov@virtuozzo.com, mhocko@suse.com, vbabka@suse.cz, mgorman@techsingularity.net, kirill.shutemov@linux.intel.com, bywxiaobai@163.com Subject: Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath Message-ID: <20160727133008.74e52024@gandalf.local.home> In-Reply-To: <5798ED5C.1020300@intel.com> References: <6b12aed89ad75cb2b3525a24265fa1d622409b42.1469629027.git.janani.rvchndrn@gmail.com> <20160727112303.11409a4e@gandalf.local.home> <5798ED5C.1020300@intel.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; 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, 27 Jul 2016 10:20:28 -0700 Dave Hansen wrote: > On 07/27/2016 08:23 AM, Steven Rostedt wrote: > >> > + > >> > + trace_mm_slowpath_end(page); > >> > + > > I'm thinking you only need one tracepoint, and use function_graph > > tracer for the length of the function call. > > > > # cd /sys/kernel/debug/tracing > > # echo __alloc_pages_nodemask > set_ftrace_filter > > # echo function_graph > current_tracer > > # echo 1 > events/kmem/trace_mm_slowpath/enable > > I hesitate to endorse using the function_graph tracer for this kind of > stuff. Tracepoints offer some level of stability in naming, and the > compiler won't ever make them go away. While __alloc_pages_nodemask is > probably more stable than most things, there's no guarantee that it will > be there. Well, then you are also advocating in a userspace ABI interface that will have to be maintained forever. Just be warned. > > BTW, what's the overhead of the function graph tracer if the filter is > set up to be really restrictive like above? Is the overhead really just > limited to that one function? Yes, if DYNAMIC_FTRACE is defined. Which it should be, because static ftrace has a huge overhead without enabling the tracer. It will enable only that function to be traced. I've recommend before that if one wants to have a good idea of how long a function lasts, they should filter to a single function. Anything else will include overhead of the tracer itself. -- Steve