Thread (4 messages) 4 messages, 4 authors, 2025-07-19

Re: [PATCH] ring-buffer: make the const read-only 'type' static

From: Christophe JAILLET <hidden>
Date: 2025-07-19 06:41:21
Also in: kernel-janitors, lkml

Le 14/07/2025 à 18:15, Steven Rostedt a écrit :
On Mon, 14 Jul 2025 17:08:58 +0100
Colin Ian King [off-list ref] wrote:
quoted
Don't populate the read-only 'type' on the stack at run time,
instead make it static.
Hmm, why not?

-- Steve
This is more efficient because there is no need to copy things on the 
stack at run-time.

It also makes binary slightly smaller.

On my x86_64, with allmodconfig:
Before:
======
  229194	 924492	  35104	1188790	 1223b6	kernel/trace/ring_buffer.o

After:
=====
  228873	 924268	  35040	1188181	 122155	kernel/trace/ring_buffer.o

CJ
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help