Re: block layer sg, bsg

From: Andi Kleen
Date: Fri Aug 06 2004 - 10:07:16 EST


> Somewhere I got the idea that if a structure is declared with attribute
> PACKED, gcc will generate alignment-independent code (e.g., access each field
> byte by byte) on alignment-restricted architectures. So if what I imagine
> about gcc is true, what issues remain? These structs have to be declared
> packed anyway and with fixed field sizes, or the layout will vary across
> architectures.

With packed things should be fine for x86-64/i386. However it may
generate bad code for other architectures.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/