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

Re: [microblaze-uclinux] Big endian contra Little endian



John,

you are right I figured it out myself too, just after posting :)

the align exception makes it easier to get stuff like ethernet working and it will get small code but as of performance it makes bad overhead for each unaligned access being handled by the exception handler.

as example the USB host drivers in microblaze uclinux 2.4.32 do not work with USB to ethernet bridges because the drivers do not handle the unaligned ethernet packets and the kernel is compiled without unaligned exception support

Antti Lukats

----- Original Message ----- From: "John Williams" <jwilliams@xxxxxxxxxxxxxx>
To: <microblaze-uclinux@xxxxxxxxxxxxxx>
Sent: Friday, September 01, 2006 12:42 PM
Subject: Re: [microblaze-uclinux] Big endian contra Little endian


Antti Lukats wrote:
Thanks,

good to know - I would assume there could be real performance increase

Not really, exceptions are expensive.  You have to interrupt the CPU,
examine the exception reason and address registers, check the opcode
that was being attempted, and then simulate it.  And all of that
achieves the result of one single instruction.

Testing with the ethernet driver proved that in practice.  Before the
data realignment engine (DRE) was added to the opb_emac, the original
version of the driver did an alignment copy of each incoming ethernet
frame, to make it conform to the kernel's expections about alignment of
IP headers.

I had hoped to see a performance improvement by implementing the
unaligned exception, but in fact it was no better, or perhaps slightly
worse.  The cost of memcpy'ing the entire packet was about the same as
the hit on unaligned accesses by the kernel into the IP header portion
of the packet.

Cheers,

John

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/



___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/