* drivers/usb/misc/emi*.c have the biggest data objects in the whole tree
@ 2007-09-14 10:35 Denys Vlasenko
2007-09-18 12:21 ` Clemens Ladisch
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Denys Vlasenko @ 2007-09-14 10:35 UTC (permalink / raw)
To: tapio.laxstrom; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: drivers/usb/misc/emi*.c have the biggest data objects in the whole tree
2007-09-14 10:35 drivers/usb/misc/emi*.c have the biggest data objects in the whole tree Denys Vlasenko
@ 2007-09-18 12:21 ` Clemens Ladisch
2007-09-19 2:47 ` Valdis.Kletnieks
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Clemens Ladisch @ 2007-09-18 12:21 UTC (permalink / raw)
To: Denys Vlasenko; +Cc: tapio.laxstrom, linux-kernel
Denys Vlasenko wrote:
> Hi Tapio,
>
> You are the author of these files. Are you still maintaining them?
His newer email address that I found with Google is dead, too.
> These two object files hold the biggest data objects in the whole
> Linux kernel
>
> 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 have a patch somewhere that moves the firmware code to userspace and changes
the drivers to use request_firmware().
Regards,
Clemens
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: drivers/usb/misc/emi*.c have the biggest data objects in the whole tree
2007-09-14 10:35 drivers/usb/misc/emi*.c have the biggest data objects in the whole tree Denys Vlasenko
2007-09-18 12:21 ` Clemens Ladisch
@ 2007-09-19 2:47 ` Valdis.Kletnieks
2007-09-28 4:41 ` Greg KH
[not found] ` <200710021018.13905.vda.linux@googlemail.com>
3 siblings, 0 replies; 7+ messages in thread
From: Valdis.Kletnieks @ 2007-09-19 2:47 UTC (permalink / raw)
To: Denys Vlasenko; +Cc: tapio.laxstrom, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]
On Fri, 14 Sep 2007 11:35:34 BST, Denys Vlasenko said:
> 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
I suggest moving those out of the kernel entirely and use the firmware loader
support to bring it in from userspace like all the *other* firmware blobs.
'INTEL_HEX_RECORD' just *screams* 'microcode' ;)
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: drivers/usb/misc/emi*.c have the biggest data objects in the whole tree
2007-09-14 10:35 drivers/usb/misc/emi*.c have the biggest data objects in the whole tree Denys Vlasenko
2007-09-18 12:21 ` Clemens Ladisch
2007-09-19 2:47 ` Valdis.Kletnieks
@ 2007-09-28 4:41 ` Greg KH
2007-09-28 11:34 ` Denys Vlasenko
[not found] ` <200710021018.13905.vda.linux@googlemail.com>
3 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2007-09-28 4:41 UTC (permalink / raw)
To: Denys Vlasenko; +Cc: tapio.laxstrom, linux-kernel
On Fri, Sep 14, 2007 at 11:35:34AM +0100, Denys Vlasenko wrote:
> 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__));
Only if you redo the whole firmware image too :)
What is this really hurting? It's only relevant if you load the
specific module, if you have this device type. It's a firmware blob,
nothing really interesting at all.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: drivers/usb/misc/emi*.c have the biggest data objects in the whole tree
2007-09-28 4:41 ` Greg KH
@ 2007-09-28 11:34 ` Denys Vlasenko
2007-09-28 19:27 ` Greg KH
0 siblings, 1 reply; 7+ messages in thread
From: Denys Vlasenko @ 2007-09-28 11:34 UTC (permalink / raw)
To: Greg KH; +Cc: tapio.laxstrom, linux-kernel
On Friday 28 September 2007 05:41, Greg KH wrote:
> On Fri, Sep 14, 2007 at 11:35:34AM +0100, Denys Vlasenko wrote:
> > 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__));
>
> Only if you redo the whole firmware image too :)
I did. It wasn't hard.
> What is this really hurting? It's only relevant if you load the
> specific module
By this logic, no space wastage in modules is worth fixing.
--
vda
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: drivers/usb/misc/emi*.c have the biggest data objects in the whole tree
2007-09-28 11:34 ` Denys Vlasenko
@ 2007-09-28 19:27 ` Greg KH
0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2007-09-28 19:27 UTC (permalink / raw)
To: Denys Vlasenko; +Cc: tapio.laxstrom, linux-kernel
On Fri, Sep 28, 2007 at 12:34:29PM +0100, Denys Vlasenko wrote:
> On Friday 28 September 2007 05:41, Greg KH wrote:
> > On Fri, Sep 14, 2007 at 11:35:34AM +0100, Denys Vlasenko wrote:
> > > 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__));
> >
> > Only if you redo the whole firmware image too :)
>
> I did. It wasn't hard.
Great, send me a patch then :)
> > What is this really hurting? It's only relevant if you load the
> > specific module
>
> By this logic, no space wastage in modules is worth fixing.
No, that's not true. Be realistic here please.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <200710021018.13905.vda.linux@googlemail.com>]
end of thread, other threads:[~2007-10-02 17:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-14 10:35 drivers/usb/misc/emi*.c have the biggest data objects in the whole tree Denys Vlasenko
2007-09-18 12:21 ` 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox