From: Steven Rostedt <rostedt@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Andrew Morton <akpm@linux-foundation.org>,
Namhyung Kim <namhyung@kernel.org>,
Takaya Saeki <takayas@google.com>,
Tom Zanussi <zanussi@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ian Rogers <irogers@google.com>,
Douglas Raillard <douglas.raillard@arm.com>
Subject: Re: [PATCH v2 3/8] tracing: Have syscall trace events read user space string
Date: Sat, 27 Sep 2025 10:43:21 -0400 [thread overview]
Message-ID: <20250927104321.50c71086@batman.local.home> (raw)
In-Reply-To: <20250925071545.578e3643@batman.local.home>
On Thu, 25 Sep 2025 07:15:45 -0400
Steven Rostedt <rostedt@kernel.org> wrote:
> I have yet to cause the retry path under stress tests. I had to insert
> a msleep() for testing purposes to make sure it worked.
I wanted to update on this. My stress test wasn't stressing enough. So
I took a "cp-mmap" program I had that did this:
map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, ifd, 0);
if (map == MAP_FAILED)
exit(-1);
ofd = open(argv[2], O_WRONLY | O_TRUNC | O_CREAT, 0644);
if (ofd < 0)
exit(-1);
do {
r = write(ofd, map + w, st.st_size - w);
if (r < 0)
exit(-1);
w += r;
} while (w < st.st_size);
Where it mmaps the source file and then writes that. This would most
definitely fault at every write. Then I ran this while tracing
sys_entry_write() and an added trace_printk() in the goto again block:
# mkdir /tmp/dump
# for f in `find /usr/bin/ ` ; do n=`basename $f`; ./cp-mmap $f /tmp/dump/$n & done
And this did cause triggering:
12771 writes where it triggered the again loop 1635 times.
Thus, it triggered 12% of the time under a very intensive stress.
That's still faster than allocation, not to mention if one is tracing
both system calls and allocations, it will start to dirty the trace.
-- Steve
next prev parent reply other threads:[~2025-09-27 14:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-23 13:04 [PATCH v2 0/8] tracing: Show contents of syscall trace event user space fields Steven Rostedt
2025-09-23 13:04 ` [PATCH v2 1/8] tracing: Replace syscall RCU pointer assignment with READ/WRITE_ONCE() Steven Rostedt
2025-09-23 13:04 ` [PATCH v2 2/8] tracing: Have syscall trace events show "0x" for values greater than 10 Steven Rostedt
2025-09-23 13:05 ` [PATCH v2 3/8] tracing: Have syscall trace events read user space string Steven Rostedt
2025-09-25 7:26 ` Peter Zijlstra
2025-09-25 11:15 ` Steven Rostedt
2025-09-27 14:43 ` Steven Rostedt [this message]
2025-09-23 13:05 ` [PATCH v2 4/8] tracing: Have system call events record user array data Steven Rostedt
2025-09-23 13:05 ` [PATCH v2 5/8] tracing: Display some syscall arrays as strings Steven Rostedt
2025-09-23 13:05 ` [PATCH v2 6/8] tracing: Allow syscall trace events to read more than one user parameter Steven Rostedt
2025-09-23 13:05 ` [PATCH v2 7/8] tracing: Add syscall_user_buf_size to limit amount written Steven Rostedt
2025-09-24 9:49 ` kernel test robot
2025-09-23 13:05 ` [PATCH v2 8/8] tracing: Show printable characters in syscall arrays Steven Rostedt
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=20250927104321.50c71086@batman.local.home \
--to=rostedt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=douglas.raillard@arm.com \
--cc=irogers@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=takayas@google.com \
--cc=tglx@linutronix.de \
--cc=zanussi@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
all inboxes | Powered by JetHome®