Re: [PATCH 27/32] scsi_data_buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux