mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Colin Ian King <colin.i.king@gmail.com>,
	"James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] scsi: scsi_debug: make read-only arrays static const
Date: Tue, 29 Jul 2025 19:45:55 +0200	[thread overview]
Message-ID: <86f359c3-8eb6-4fd7-8411-12d12e301d61@wanadoo.fr> (raw)
In-Reply-To: <20250729064930.1659007-1-colin.i.king@gmail.com>

Le 29/07/2025 à 08:49, Colin Ian King a écrit :
> Don't populate the read-only arrays on the stack at run time, instead
> make them static const. Also reduces overall size.
> 
> before:
>     text	   data	    bss	    dec	    hex	filename
>   367439	  89582	   5952	 462973	  7107d	drivers/scsi/scsi_debug.o
> 
> after:
>     text	   data	    bss	    dec	    hex	filename
>   365847	  90702	   5952	 462501	  70ea5	drivers/scsi/scsi_debug.o

Hi,

out of curiosity, any idea why 'data' increase?

All my constification patches lead to data reduction.

> 
> (gcc 14.2.0, x86-64)

(same kind of behavior with 15.1.1)


CJ

  parent reply	other threads:[~2025-07-29 17:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-29  6:49 Colin Ian King
2025-07-29 16:02 ` Bart Van Assche
2025-07-29 17:45 ` Christophe JAILLET [this message]
2025-07-29 19:49   ` Colin King (gmail)
2025-07-29 20:09     ` Christophe JAILLET
2025-07-31  3:27 ` Martin K. Petersen
2025-08-06  2:39 ` Martin K. Petersen

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=86f359c3-8eb6-4fd7-8411-12d12e301d61@wanadoo.fr \
    --to=christophe.jaillet@wanadoo.fr \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=colin.i.king@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /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®