Re: [PATCH 3/4]: Unaligned pointer access

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

 



Quoting Ian McDonald:
|  On 6/29/07, Gerrit Renker <gerrit@xxxxxxxxxxxxxx> wrote:
|  > [DCCP]: Unaligned pointer access
|  >
|  > Signed-off-by: Gerrit Renker <gerrit@xxxxxxxxxxxxxx>
|  
|  Signed-off-by: Ian McDonald <ian.mcdonald@xxxxxxxxxxx>
|  (I don't really understand the alignment stuff but trust you!)
The described exceptions happened on a sparc64 machine (I don't have x86_64).

As far as I know on an i386 you can access unaligned data without performance
penalty, on other machines (such as sparc64), unaligned access is handled by
an exception handler - and this is very expensive.

The get|put_unaligned in include/asm-xxx/unaligned.h avoid triggering the unaligned
exception. 

It is not complicated, a nice summary is in Linux Device Drivers #3, Chapter 11
and examples are in include/asm-generic/unaligned.h
-
To unsubscribe from this list: send the line "unsubscribe dccp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [IETF DCCP]     [Linux Networking]     [Git]     [Security]     [Linux Assembly]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux