[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250902160020.5cd24fce@batman.local.home>
Date: Tue, 2 Sep 2025 16:00:20 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Elijah <me@...jahs.space>
Cc: Elijah Wright <git@...jahs.space>, Masami Hiramatsu
<mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH] tracing: move buffer in trace_seq to end of struct
On Thu, 21 Aug 2025 11:32:17 -0700
Elijah <me@...jahs.space> wrote:
> can we maybe encode the overflow state in seq_buf? check if
> seq_buf_has_overflowed and clamp len back to the used size
> (seq_buf_used) in a helper?
I could add a bit to the size?
diff --git a/include/linux/seq_buf.h b/include/linux/seq_buf.h
index 52791e070506..ea4996851901 100644
--- a/include/linux/seq_buf.h
+++ b/include/linux/seq_buf.h
@@ -20,8 +20,9 @@
*/
struct seq_buf {
char *buffer;
- size_t size;
- size_t len;
+ unsigned int size;
+ unsigned int len:31;
+ unsigned int full:1;
};
#define DECLARE_SEQ_BUF(NAME, SIZE) \
-- Steve
Powered by blists - more mailing lists