From: Dan Magenheimer Subject: RE: Re: Even faster page copy for Xen? Date: Tue, 10 Aug 2010 05:31:49 -0700 (PDT) Message-ID: <8e0efd21-1863-489c-a58a-317f69646a3b@default> References: <4C5BDC79020000780000E9AB@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4C610CAD020000780000EF6A@vpn.id2.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , Dulloor Cc: xen-devel@lists.xensource.com, Keir Fraser List-Id: xen-devel@lists.xenproject.org > >> Why would you say using xmm/sse in Xen is a bad idea ? We already > have a > >> copy_page_sse2 (in copy_page.S) in our code base and available (by > default) > >> for x86_64. Is it a bad idea to use that ? > > > > Never mind about copy_page_sse2 ! That function name is misleading. >=20 > Why - it is code that's dependent on SSE2 to be available. Note it > doesn't have 'xmm' in its name - that indeed would be misleading. >=20 > > But, still ... I need a copy_page routine and was planning to use > sse. > > Is that not fine ? >=20 > You can do so if you feel like saving/restoring all necessary XMM > state isn't going to eat up all of the performance win... Again excuse my x86 ignorance, but on some architectures floating point registers can be saved/restored "lazily" because there is a privileged bit that disables their use (which can be trapped and used as a "floating-point dirty" bit). Is there anything equivalent for the XMM state? If so, then lazy save might be a good approach. If not, then I agree that the state save/restore overhead might eat up the performance win. (However, if we were to later use Linux memory compaction and NUMA page migration, the performance tradeoff might change to positive.)