From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757635AbcG1ULa (ORCPT ); Thu, 28 Jul 2016 16:11:30 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:33311 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754969AbcG1UL2 convert rfc822-to-8bit (ORCPT ); Thu, 28 Jul 2016 16:11:28 -0400 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath From: Janani Ravichandran In-Reply-To: <20160727112303.11409a4e@gandalf.local.home> Date: Fri, 29 Jul 2016 01:41:20 +0530 Cc: 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 Content-Transfer-Encoding: 8BIT Message-Id: <0AF03F78-AA34-4531-899A-EA1076B6B3A1@gmail.com> References: <6b12aed89ad75cb2b3525a24265fa1d622409b42.1469629027.git.janani.rvchndrn@gmail.com> <20160727112303.11409a4e@gandalf.local.home> To: Steven Rostedt X-Mailer: Apple Mail (2.2104) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Jul 27, 2016, at 8:53 PM, Steven Rostedt wrote: > > 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 Thank you so much for your feedback! Actually, the goal is to only single out those cases with latencies higher than a given threshold. So, in accordance with this, I added those begin/end tracepoints and thought I could use a script to read the output of trace_pipe and only write to disk the trace information associated with latencies above the threshold. This would help prevent high disk I/O, especially when the threshold set is high. I looked at function graph trace, as you’d suggested. I saw that I could set a threshold there using tracing_thresh. But the problem was that slowpath trace information was printed for all the cases (even when __alloc_pages_nodemask latencies were below the threshold). Is there a way to print tracepoint information only when __alloc_pages_nodemask exceeds the threshold? Thanks! Janani. > > -- Steve > > >> return page; >> } >> >