Re: RFC: reduce CONFIG_SCSI_CONSTANTS impact by 4k

2015-10-06 Thread Julian Calaby
Hi Rasmus, On Wed, Oct 7, 2015 at 2:39 AM, Rasmus Villemoes wrote: > On Tue, Oct 06 2015, Julian Calaby wrote: > >> Hi Rasmus, >> >>> >>> diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c >>> index 47aaccd5e68e..ccd34b0481cd 100644 >>> --- a/drivers/scsi/constants.c >>> +++ b/driv

Re: RFC: reduce CONFIG_SCSI_CONSTANTS impact by 4k

2015-10-06 Thread Rasmus Villemoes
On Tue, Oct 06 2015, Julian Calaby wrote: > Hi Rasmus, > >> >> diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c >> index 47aaccd5e68e..ccd34b0481cd 100644 >> --- a/drivers/scsi/constants.c >> +++ b/drivers/scsi/constants.c >> @@ -292,17 +292,31 @@ bool scsi_opcode_sa_name(int opco

Re: RFC: reduce CONFIG_SCSI_CONSTANTS impact by 4k

2015-10-05 Thread Julian Calaby
Hi Rasmus, On Sun, Oct 4, 2015 at 9:09 AM, Rasmus Villemoes wrote: > Subject: [PATCH 2/2] scsi: reduce CONFIG_SCSI_CONSTANTS=y impact by 8k > > On 64 bit, struct error_info has 6 bytes of padding, which amounts to > over 4k of wasted space in the additional[] array. We could easily get > rid of t

Re: RFC: reduce CONFIG_SCSI_CONSTANTS impact by 4k

2015-10-04 Thread Christoph Hellwig
On Sun, Oct 04, 2015 at 12:09:58AM +0200, Rasmus Villemoes wrote: > On Sat, Oct 03 2015, Christoph Hellwig wrote: > > > Hi Rasmus, > > > > I like this idea. But maybe it's also time to just move the constants > > to a plain text file and auto-generate C headers from them? That way > > the forma

Re: RFC: reduce CONFIG_SCSI_CONSTANTS impact by 4k

2015-10-03 Thread Rasmus Villemoes
On Sat, Oct 03 2015, Christoph Hellwig wrote: > Hi Rasmus, > > I like this idea. But maybe it's also time to just move the constants > to a plain text file and auto-generate C headers from them? That way > the format in which they can be edited is decoupled from the > representation in the kern

Re: RFC: reduce CONFIG_SCSI_CONSTANTS impact by 4k

2015-10-03 Thread Christoph Hellwig
Hi Rasmus, I like this idea. But maybe it's also time to just move the constants to a plain text file and auto-generate C headers from them? That way the format in which they can be edited is decoupled from the representation in the kernel image. -- To unsubscribe from this list: send the line "

RFC: reduce CONFIG_SCSI_CONSTANTS impact by 4k

2015-09-30 Thread Rasmus Villemoes
struct error_info has 6 bytes of padding on x86_64 (and I assume also other 64 bit platforms). This currently amounts to about 4k of wasted space (and presumably a third of that on 32 bit). We can avoid that by keeping the codes and the strings in separate arrays. Keeping those in sync should be e