WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [Xen-ia64-devel] [PATCH] Fix unaligned reference of QEMU

To: "Duan, Ronghui" <ronghui.duan@xxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [PATCH] Fix unaligned reference of QEMU
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Tue, 21 Aug 2007 06:23:02 -0600
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 21 Aug 2007 05:24:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <82C666AA63DC75449C51EAD62E8B2BEC115E11@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: HP OSLO R&D
References: <82C666AA63DC75449C51EAD62E8B2BEC115E11@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
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/677731eb734d

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/896b536d66c9

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-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

<Prev in Thread] Current Thread [Next in Thread>