Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath

From: Janani Ravichandran
Date: Thu Jul 28 2016 - 16:11:33 EST



> On Jul 27, 2016, at 8:53 PM, Steven Rostedt <rostedt@xxxxxxxxxxx> 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;
>> }
>>
>