linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Enrico Weigelt, metux IT consult" <lkml@metux.net>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	"Darren Hart (VMware)" <dvhart@infradead.org>,
	Mattias Jacobsson <2pi@mok.nu>
Cc: Jeff Mahoney <jeffm@suse.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mod_devicetable.h: reduce sizeof(struct of_device_id) by 80 bytes
Date: Fri, 26 Apr 2019 13:05:57 +0200	[thread overview]
Message-ID: <62959593-6029-e66e-ebee-314db7aa6f10@metux.net> (raw)
In-Reply-To: <20190425203101.9403-1-linux@rasmusvillemoes.dk>

On 25.04.19 22:31, Rasmus Villemoes wrote:

Hi,

> A typical kernel image has hundreds of static struct of_device_id
> instances (a lot of which are sentinel all-zeroes), each occupying
> ~200 bytes. Nobody initializes the .compatible member with strings
> anywhere near 128 bytes, so a lot of that memory is simply wasted.

I just wonder whether it has to be a fixed size array at all, instead
of an const char* pointer. Using a pointer should, IMHO, offer even
more savings while not having the size limit at all.

Is that struct copied as-is somewhere ?


--mtx

-- 
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

  parent reply	other threads:[~2019-04-26 11:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-25 20:31 [PATCH] mod_devicetable.h: reduce sizeof(struct of_device_id) by 80 bytes Rasmus Villemoes
2019-04-26  9:27 ` Arnd Bergmann
2019-05-02  9:41   ` Rasmus Villemoes
2019-05-02 12:29     ` Jeff Mahoney
2019-05-02 13:07       ` Rasmus Villemoes
2019-04-26 11:05 ` Enrico Weigelt, metux IT consult [this message]
2019-04-26 11:33   ` Rasmus Villemoes

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=62959593-6029-e66e-ebee-314db7aa6f10@metux.net \
    --to=lkml@metux.net \
    --cc=2pi@mok.nu \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=dvhart@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jeffm@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    /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).