public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Denys Vlasenko <vda.linux@googlemail.com>
To: tapio.laxstrom@iptime.fi
Cc: linux-kernel@vger.kernel.org
Subject: drivers/usb/misc/emi*.c have the biggest data objects in the whole tree
Date: Fri, 14 Sep 2007 11:35:34 +0100	[thread overview]
Message-ID: <200709141135.35239.vda.linux@googlemail.com> (raw)

Hi Tapio,

You are the author of these files. Are you still maintaining them?
If not, do you know who is the current maintainer?

These two object files hold the biggest data objects in the whole Linux kernel
after lockdep:

   text    data     bss     dec     hex filename
   1258  160516       0  161774   277ee ./drivers/usb/misc/emi26.o
   1504  209296       0  210800   33770 ./drivers/usb/misc/emi62.o

Basically, these are big arrays of the following structures:

typedef struct _INTEL_HEX_RECORD
{
        __u32   length;
        __u32   address;
        __u32   type;
        __u8    data[MAX_INTEL_HEX_RECORD_LENGTH];
} INTEL_HEX_RECORD;

I suggest the following optimizations:

Change structure to

typedef struct _INTEL_HEX_RECORD
{
        __u8   type;
        __u8   length;
        __u16   address;
        __u8    data[MAX_INTEL_HEX_RECORD_LENGTH];
} INTEL_HEX_RECORD __attribute__((__packed__));

Store gzip compressed tables and unpack them at load time.

Declare them const and __initdata.

I can do it if there is no active maintainer.
--
vda

             reply	other threads:[~2007-09-14 10:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-14 10:35 Denys Vlasenko [this message]
2007-09-18 12:21 ` drivers/usb/misc/emi*.c have the biggest data objects in the whole tree Clemens Ladisch
2007-09-19  2:47 ` Valdis.Kletnieks
2007-09-28  4:41 ` Greg KH
2007-09-28 11:34   ` Denys Vlasenko
2007-09-28 19:27     ` Greg KH
     [not found] ` <200710021018.13905.vda.linux@googlemail.com>
     [not found]   ` <20071002163532.GA12526@kroah.com>
2007-10-02 17:18     ` testers needed for drivers/usb/misc/emi*.c Denys Vlasenko

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=200709141135.35239.vda.linux@googlemail.com \
    --to=vda.linux@googlemail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tapio.laxstrom@iptime.fi \
    /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