Messages in this thread | | | Subject | Re: New struct sock_common breaks parisc 64 bit compiles with a misalignment | From | James Bottomley <> | Date | 15 Jun 2003 10:17:10 -0500 |
| |
On Sun, 2003-06-15 at 09:35, David S. Miller wrote: > Welcome to the real world, unaligned accesses are perfectly > legal in the networking stack.
I didn't say we couldn't do unaligned accesses, I said we have to do them by marking the structure as potentially misaligned so the compiler generates instructions that won't trap.
It's slightly more expensive to access the structure this way (the compiler usually does eight byte loads instead of a double word load, but it's still far cheaper than having an unaligned access trap).
> They are in fact guarenteed to occur when certain protocols > are encapsulated in others. > > Please add an unaligned trap handler for parisc64, thanks.
It's not necessary and would, indeed, be detrimental to operation since we'd generate alignment traps on almost every encapsulated protocol (at several hundred instructions per trap). If we do this, our network performance will tank.
As of 2.5.70, the networking layer seems to comply perfectly with the parisc requirements (at least we don't have any misaligned access trap panics from it), so most of the structures are correctly marked, anyway.
James
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |