driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: "'Joe Perches'" <joe@perches.com>,
	"Colin King" <colin.king@canonical.com>,
	"Jérôme Pouiller" <jerome.pouiller@silabs.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>
Cc: "kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] staging: wfx: make a const array static, makes object smaller
Date: Mon, 19 Oct 2020 08:09:19 +0000	[thread overview]
Message-ID: <048fded745634e369fa2646f87a05ec4@AcuMS.aculab.com> (raw)
In-Reply-To: <09cd7e609324d460afdf14829baf3c2f1a9cb9cd.camel@perches.com>

From: Joe Perches
> Sent: 17 October 2020 01:12
> 
> On Fri, 2020-10-16 at 23:33 +0100, Colin King wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > Don't populate const array filter_ies on the stack but instead
> > make it static. Makes the object code smaller by 261 bytes.
> >
> > Before:
> >    text	   data	    bss	    dec	    hex	filename
> >   21674	   3166	    448	  25288	   62c8	drivers/staging/wfx/sta.o
> >
> > After:
> >    text	   data	    bss	    dec	    hex	filename
> >   21349	   3230	    448	  25027	   61c3	drivers/staging/wfx/sta.o
> 
> Thanks.
> 
> It's odd to me it's so large a change as it's only
> 24 bytes of initialization. (3 entries, each 8 bytes)

Perhaps the 'stack protector' crap?

Interestingly, loading the data from the 'readonly' section
is probably a data cache miss.
Which might end up being slower than the extra code to
update the on-stack data.
The extra code might get prefetched...

	David
 

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply	other threads:[~2020-10-19  8:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16 22:33 [PATCH] staging: wfx: make a const array static, makes object smaller Colin King
2020-10-17  0:11 ` Joe Perches
2020-10-19  8:09   ` David Laight [this message]
2020-10-19  9:43     ` Jérôme Pouiller
2020-10-19 17:52   ` Christophe JAILLET

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=048fded745634e369fa2646f87a05ec4@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=colin.king@canonical.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jerome.pouiller@silabs.com \
    --cc=joe@perches.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.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;
as well as URLs for NNTP newsgroup(s).