Messages in this thread | | | Date | Mon, 28 Jun 2004 16:52:34 -0700 | From | Matthew Dharm <> | Subject | Re: drivers/block/ub.c |
| |
On Mon, Jun 28, 2004 at 02:01:57PM -0700, Pete Zaitcev wrote: > On Mon, 28 Jun 2004 13:50:58 -0700 > Matthew Dharm <mdharm-kernel@one-eyed-alien.net> wrote: > > > > struct txd { > > > u32 dma_addr; > > > u32 length; > > > }; > > > > > > It is just total and utter madness to put a packed or the proposed > > > __nopadding__ attribute on that structure. Yet this seems to be > > > what was suggested now and at the beginning of this thread. > > > > I guess, in the end, what this comes down to is the fact that we're all > > going to get bitten on the ass when we finally get to a platform where the > > default alignment is 64-bits, which would then (by default) add padding to > > the above structure. > > > > How long until that time comes? Likely within my lifetime, and I'd rather > > not have to re-write working code into more working code because I couldn't > > express to the compiler what I needed it to do. > > I, for one, am not engaging into such flights of fancy as a platform > with larger than natural alignment requirements. Would you even read > what you're writing? The whole freaking world abandons silly platforms > and moves to x86 extensions and you're fantasizing about a return > to Cray-1. It just ain't happening!
Actually, I've been working with a controller for the last several months (the "latest and greatest", state-of-the-art technology), which can only to loads/stores in 64-byte units at a minimum.
Yes, I mean "byte". 128-bits wide * 4 DDR beats (2 dobule-edged clocks). There are no DM pins on the memory interface, so any write less than that size must be a read-modify-write.
And, I was just having a conversation with a compiler group which was considering moving to 64-byte alignment as a speed optimization for this platform, or at least 16-byte (64 bit), which also aligns well with the native load/store of the CPU involved.
I only wish I was fantasizing about this.
Matt
-- Matthew Dharm Home: mdharm-usb@one-eyed-alien.net Maintainer, Linux USB Mass Storage Driver
P: Nine more messages in admin.policy. M: I know, I'm typing as fast as I can! -- Pitr and Mike User Friendly, 11/27/97 [unhandled content-type:application/pgp-signature] | |