The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Colin King (gmail)" <colin.i.king@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>,
	Steve Wahl <steve.wahl@hpe.com>, Joe Perches <joe@perches.com>
Cc: Colin Ian King <colin.i.king@googlemail.com>,
	Mike Travis <mike.travis@hpe.com>,
	Dimitri Sivanich <dimitri.sivanich@hpe.com>,
	Russ Anderson <russ.anderson@hpe.com>,
	Darren Hart <dvhart@infradead.org>,
	Andy Shevchenko <andy@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H . Peter Anvin" <hpa@zytor.com>,
	platform-driver-x86@vger.kernel.org,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/platform/uv: make const pointer dots a static const array
Date: Thu, 2 Dec 2021 09:21:28 +0000	[thread overview]
Message-ID: <be66d773-0441-0ccb-54fa-1d8f952b8f59@gmail.com> (raw)
In-Reply-To: <d642a431-41f9-fef5-0c7f-c4cf133c945e@redhat.com>

On 02/12/2021 09:10, Hans de Goede wrote:
> Hi,
> 
> On 12/1/21 22:39, Steve Wahl wrote:
>> On Tue, Nov 30, 2021 at 04:26:39PM -0800, Joe Perches wrote:
>>> On Tue, 2021-11-30 at 13:34 -0600, Steve Wahl wrote:
>>>> On Sat, Nov 27, 2021 at 05:03:20PM +0000, Colin Ian King wrote:
>>>>> Don't populate the const array dots on the stack
>>> []
>>>> Examination of the disassembly shows that the compiler actually
>>>> eliminates the creation of the pointer "dots" on the stack and just
>>>> passes the address of the string constant to the printk function.
>>>>
>>>> So this change should not have any actual effect (I don't know where
>>>> you got the "shrinks object code" from), and in my humble opinion
>>>> makes the code less clear.
>>>
>>> Probably shrinks an allmodconfig where the symbols are referenced.
>>> It probably doesn't do anything to a defconfig.
>>
>> OK, I looked. Under allmodconfig, the new code is one byte smaller.
>>
>> Defconfig doesn't include CONFIG_X86_UV and this file doesn't get
>> compiled.
>>
>> Using defconfig plus CONFIG_X86_UV and prerequisites, the new code is
>> 24 bytes larger, probably because of alignment added.
>>
>> allmodconfig:
>>
>>     text	   data	    bss	    dec	    hex	filename
>>    30827	  18358	   1472	  50657	   c5e1	uv_nmi.o
>>    30828	  18358	   1472	  50658	   c5e2	uv_nmi.orig.o
>>
>> default config + CONFIG_X86_UV:
>>
>>     text	   data	    bss	    dec	    hex	filename
>>     9918	    216	    160	  10294	   2836	uv_nmi.o
>>     9894	    216	    160	  10270	   281e	uv_nmi.orig.o
>>
>> So I still don't think this patch makes sense.
> 
> I agree, so I've dropped this patch from the queue.
> 
> Regards,
> 
> Hans
> 

+1.   Apologies for wasting your valuable time. I appreciate the 
detailed review.

Colin

      reply	other threads:[~2021-12-02  9:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-27 17:03 [PATCH] x86/platform/uv: make const pointer dots a static const array Colin Ian King
2021-11-30 19:34 ` Steve Wahl
2021-12-01  0:26   ` Joe Perches
2021-12-01 21:39     ` Steve Wahl
2021-12-02  9:10       ` Hans de Goede
2021-12-02  9:21         ` Colin King (gmail) [this message]

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=be66d773-0441-0ccb-54fa-1d8f952b8f59@gmail.com \
    --to=colin.i.king@gmail.com \
    --cc=andy@infradead.org \
    --cc=bp@alien8.de \
    --cc=colin.i.king@googlemail.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dimitri.sivanich@hpe.com \
    --cc=dvhart@infradead.org \
    --cc=hdegoede@redhat.com \
    --cc=hpa@zytor.com \
    --cc=joe@perches.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.travis@hpe.com \
    --cc=mingo@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=russ.anderson@hpe.com \
    --cc=steve.wahl@hpe.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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