lkml.org 
[lkml]   [2022]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] selftests/ftrace: Limit number of lines processed in 'trace'
On Mon, 17 Oct 2022 16:25:02 +0530
"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> wrote:

> On very large machines, ftracetest can seem to hang or otherwise take a
> very long time to complete individual tests. This can be attributed to
> statements that try to process the entire contents of 'trace'.
>
> Limit the number of lines processed from 'trace' to resolve this. Apart
> from the change in test.d/functions to add TRACENL, this commit is the
> result of running the below command (and fixing some whitespace errors):
> grep -l -R 'cat trace |' -- ./tools/testing/selftests/ftrace/test.d/ | \
> xargs -n 1 sed --in-place -e "s/cat trace |/head -\$\{TRACENL\} trace |/g"
>

No. This shows that there's an issue in the test. This should never hang
even with a thousand CPUs.

You need to make sure that the "pause-on-trace" option is set or tracing_on
is set to 0 (disabled). Otherwise, if the tracing is still active, then the
reading of the trace file could potentially never end.

Did you have tracing enabled and "pause_on_trace" not set when you ran that
above command? If so, then it may take forever to finish. But the tests
should take care to not read the trace file unless it has stopped tracing.

If there's a case where it will read while tracing is active, then sure, we
need to limit the reporting, otherwise nack on this change.

-- Steve

\
 
 \ /
  Last update: 2022-10-17 16:51    [W:0.783 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site