From: Steven Rostedt <rostedt@goodmis.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Sachin Sant <sachinp@linux.ibm.com>
Subject: Re: [PATCH] tracing: Have trace_marker writes be just half of TRACE_SEQ_SIZE
Date: Mon, 4 Mar 2024 19:49:08 -0500 [thread overview]
Message-ID: <20240304194908.6d8d4fba@gandalf.local.home> (raw)
In-Reply-To: <fa113c5c-07c7-417b-8287-c9bf5f9b42a1@infradead.org>
On Mon, 4 Mar 2024 16:43:46 -0800
Randy Dunlap <rdunlap@infradead.org> wrote:
> > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> > index 8198bfc54b58..d68544aef65f 100644
> > --- a/kernel/trace/trace.c
> > +++ b/kernel/trace/trace.c
> > @@ -7320,6 +7320,17 @@ tracing_mark_write(struct file *filp, const char __user *ubuf,
> > if ((ssize_t)cnt < 0)
> > return -EINVAL;
> >
> > + /*
> > + * TRACE_SEQ_SIZE is the total size of trace_seq buffer used
> > + * for output. As the print event outputs more than just
> > + * the string written, keep it smaller than the trace_seq
> > + * as it could drop the event if the extra data makes it bigger
> > + * than what the trace_seq can hold. Half he TRACE_SEQ_SIZE
>
> the
I honestly think my 't' key isn't triggering as much. At least when before
hitting 'h', as I noticed I've been writing "he", "hey" and "here" a lot,
and spell check isn't (obviously) catching it ;-)
-- Steve
>
> > + * is more than enough.
> > + */
> > + if (cnt > TRACE_SEQ_SIZE / 2)
> > + cnt = TRACE_SEQ_SIZE / 2;
> > +
> > meta_size = sizeof(*entry) + 2; /* add '\0' and possible '\n' */
> > again:
> > size = cnt + meta_size;
>
>
next prev parent reply other threads:[~2024-03-05 0:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-05 0:27 [PATCH] tracing: Have trace_marker writes be just half of TRACE_SEQ_SIZE Steven Rostedt
2024-03-05 0:43 ` Randy Dunlap
2024-03-05 0:49 ` Steven Rostedt [this message]
2024-03-05 1:15 ` Mathieu Desnoyers
2024-03-05 1:35 ` Steven Rostedt
2024-03-05 1:36 ` Mathieu Desnoyers
2024-03-05 1:57 ` Steven Rostedt
2024-03-05 1:41 ` Steven Rostedt
2024-03-05 1:42 ` Mathieu Desnoyers
2024-03-05 1:59 ` Steven Rostedt
2024-03-05 2:18 ` Mathieu Desnoyers
2024-03-05 2:35 ` Steven Rostedt
2024-03-05 2:37 ` Steven Rostedt
2024-03-05 2:48 ` Mathieu Desnoyers
2024-03-05 3:07 ` 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=20240304194908.6d8d4fba@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rdunlap@infradead.org \
--cc=sachinp@linux.ibm.com \
--cc=torvalds@linux-foundation.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