List Info

Thread: Re: Fix unaligned reference of QEMU




Re: Fix unaligned reference of QEMU
country flaguser name
United States
2007-08-21 07:23:02
On Tue, 2007-08-21 at 14:58 +0800, Duan, Ronghui wrote:
> Hi
> 
> In current changeset.,qemu copy data uses memcpy_words,
which copies 4
> bytes at once if the length is larger than 4. This
causes unaligned
> reference and leads to a performance downgrade. The
issue met in
> rtl8139 emulator. This patch fixes it.

Hi,

   I'd like to see this get fixed, but I'm not sure this is
the right
way to do it.  Originally, there was a simple memcpy() here.
  The
trouble started with this patch:

http://xenbits.xensource.com/xen-unstable.hg?rev/67
7731eb734d

This change required 8-byte alignment on 64 bit systems
instead of the
4-byte claimed in the changelog, which resulted in this
patch:

http://xenbits.xensource.com/xen-unstable.hg?rev/89
6b536d66c9

Now the problem appears to be that memcpy_words() is not
isolated to
only the USB traffic.  When I see the unaligned accesses,
they seem to
have some correlation with network traffic, and your
benchmark results
prove that.  I think we need figure out when to use
memcpy_words to
avoid the USB issue and when to use memcpy.  Maybe we can do
that by
looking at the alignment and using the best one, or maybe
it's possible
to distinguish data streams in exec-dm.  Thanks,

	Alex 

-- 
Alex Williamson                             HP Open Source
& Linux Org.


_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devellists.xensource.com
http://list
s.xensource.com/xen-ia64-devel

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )