From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>,
Shuah Khan <shuah@kernel.org>, <linux-kernel@vger.kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Akanksha J N <akanksha@linux.vnet.ibm.com>
Subject: Re: [PATCH] selftests/ftrace: Limit number of lines processed in 'trace'
Date: Wed, 19 Oct 2022 00:19:49 +0900 [thread overview]
Message-ID: <20221019001949.950fb044677f96c6cdd00fdf@kernel.org> (raw)
In-Reply-To: <20221017105103.540a87c7@gandalf.local.home>
On Mon, 17 Oct 2022 10:51:03 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
> 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.
initialize_ftrace() does this setting. So it must be set.
If you run the ftracetest on old kernel, this feature is not there and
it may cause a trouble. Naveen, can you clarify it?
Thank you,
>
> 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
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
next prev parent reply other threads:[~2022-10-18 15:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 10:55 [PATCH] selftests/ftrace: Limit number of lines processed in 'trace' Naveen N. Rao
2022-10-17 14:51 ` Steven Rostedt
2022-10-18 15:19 ` Masami Hiramatsu [this message]
2022-10-18 15:22 ` Steven Rostedt
2022-10-19 9:45 ` Naveen N. Rao
2022-10-19 15:46 ` Masami Hiramatsu
2022-10-28 7:29 ` Naveen N. Rao
2022-10-18 22:41 ` Shuah Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221019001949.950fb044677f96c6cdd00fdf@kernel.org \
--to=mhiramat@kernel.org \
--cc=akanksha@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=rostedt@goodmis.org \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).