On Thu, Oct 18 2007 at 10:54 +0200, Matthew Wilcox <[EMAIL PROTECTED]> wrote:
> On Thu, Oct 18, 2007 at 10:16:38AM +0200, Boaz Harrosh wrote:
>> Sorry Matthew, my mistake I forgot to send the last [33/33] patch
>> this here should be done on top of that last one.
> 
> Yeah.  I'll rebase the series of 4 patches I just sent on top of it when
> I wake up in the morning.
> 
>> I will grab your tool and play with it. The sglist pointer shuffle
>> is good, and also I know that if you put the scsi_data_buffer
>> at the beginning of scsi_cmnd, than you can fill the holes with small types
>> following the sub-structure. I'll give it a try.
> 
> No, that doesn't work ;-(
> 
> I think a macro to hide the ugliness of my earlier suggestion might fly.
> Something like ...
> 
> #define STRUCT_PACK(a, b, c, d) \
>       union { a; struct { \
>               char _packed_ ## __stringify(a) [sizeof(a) - sizeof(c) + 
> sizeof(d)]; \
>               b; \
>       }; }
> 
> then we use it like:
> 
> struct scsi_cmnd {
>       ...
>       STRUCT_PACK(struct scsi_data_buffer sdb, int result,
>                                               sizeof(long), sizeof(int));
> }
> 
> Even that's still pretty foul (and i have my grave doubts about using
> stringify in that manner).  It's definitely past my bedtime now ... but
> a hack like that could save us another 8 bytes on x86-64.
> 

You lost me.
What union, please look at patch [33/33]

Boaz

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to