From: Dan Magenheimer Subject: RE: [PATCH] x86: add SSE-based copy_page() Date: Wed, 19 Nov 2008 20:24:15 +0000 (GMT) Message-ID: <1e07957a-d4fe-40f9-8b2d-cf247d65ff09@default> References: Mime-Version: 1.0 Content-Type: text/plain; charset=shift_jis Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , "Cui, Dexuan" , Jan Beulich Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org I haven't had a chance to test this further yet, but I see the patch was already taken (c/s 18772). Why, given that performance gets worse under some circumstances? At least maybe there should be two interfaces: copy_page_cold_cache() and copy_page_warm_cache() rather than just assume? I'll post measurements when I get a chance to test, but bring this up as a placeholder for now. Thanks, Dan > -----Original Message----- > From: Keir Fraser [mailto:keir.fraser@eu.citrix.com] > Sent: Friday, November 14, 2008 7:16 AM > To: Dan Magenheimer; Cui, Dexuan; Jan Beulich > Cc: xen-devel@lists.xensource.com > Subject: Re: [Xen-devel] [PATCH] x86: add SSE-based copy_page() > > > That should indeed do the job. > > -- Keir > > On 14/11/08 14:10, "Dan Magenheimer" > wrote: > > > Thanks Dexuan! I don't want to flush the TLB (which > > wbinvd does) so it looks like the way to flush cache > > on a page in Xen is: > > > > #include > > flush_area_local(va,FLUSH_CACHE|FLUSH_ORDER(0)) > > > > > >> -----Original Message----- > >> From: Cui, Dexuan [mailto:dexuan.cui@intel.com] > >> Sent: Thursday, November 13, 2008 8:08 PM > >> To: Dan Magenheimer; Jan Beulich > >> Cc: xen-devel@lists.xensource.com > >> Subject: RE: [Xen-devel] [PATCH] x86: add SSE-based copy_page() > >> > >> > >> Hi Dan, > >> clflush(flush a cache line; you may need a loop to flush a > >> page.) or wbinvd(flush all the caches) should be what you > >> need to flush caches on x86. > >> > >> Thanks, > >> -- Dexuan > >> > >> > >> -----Original Message----- > >> From: xen-devel-bounces@lists.xensource.com > >> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of > >> Dan Magenheimer > >> Sent: 2008=94N11=8C=8E14=93=FA 7:42 > >> To: Jan Beulich > >> Cc: xen-devel@lists.xensource.com > >> Subject: RE: [Xen-devel] [PATCH] x86: add SSE-based copy_page() > >> > >>> This very much depends on whether the page(s) are in any > caches - in > >>> the general case (e.g. when dealing with large sets of > data, or data > >>> just read from disk), you'd expect both pages (source and > >> destination) > >>> not to be in any cache. This is where using the streaming > >> instructions > >>> helps. > >>> > >>> However, when dealing with a small set of pages (or even > >> just a single > >>> source/destination pair), you'd easily run entirely on L1 or > >>> L2 data, which > >>> certainly performs better using the non-streaming instructions. > >> > >> Is there a way to force-flush-cache on a page full of > data? (I knew > >> how to do this once on ia64...) I can easily measure > warm-start but > >> am not sure how to measure cold-start without some kind of flush. > >> > >> Thanks, > >> Dan > >> > >> _______________________________________________ > >> Xen-devel mailing list > >> Xen-devel@lists.xensource.com > >> http://lists.xensource.com/xen-devel > >> > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >