From: "Jan Beulich" <jbeulich@novell.com>
To: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: xen-devel@lists.xensource.com
Subject: RE: [PATCH] x86: add SSE-based copy_page()
Date: Thu, 13 Nov 2008 08:37:26 +0000 [thread overview]
Message-ID: <491BF556.76E4.0078.0@novell.com> (raw)
In-Reply-To: <6a20476a-f9f8-447b-bcdb-65009f38fcce@default>
>>> Dan Magenheimer <dan.magenheimer@oracle.com> 12.11.08 18:17 >>>
>Hmmm... I'm working on a project that does extensive page-copying
>so was eager to give it a spin on two test machines, one a Core 2 Duo
>("Weybridge"), the other an as-yet-unreleased Intel box. I measured
>the routine with rdtsc, took many thousands of samples, and
>look at the smallest measurement. The hypervisor measured is
>64-bit so "cpu_has_xmm2" appears to always be true.
>
>On the first machine, the change to use sse2 instructions
>made no difference. On the second machine, using sse2 actually
>made copy_page() *worse* (by 30-40%).
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.
>I'm poor enough with the x86 instruction set that I can't explain
>my results, but thought I would report them. I'm not doubting that
>you saw improvements on your box, just noting that YMMV.
>
>Perhaps someone from Intel familiar with the microarchitectures
>might be able to explain (and can query me offlist to identify
>the as-yet-unreleased box).
The above is not to say that there are other reasons why this would
perform worse on as-yet-unreleased hardware (which I wasn't able
to test on and hence can't say anything about).
Jan
next prev parent reply other threads:[~2008-11-13 8:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-12 9:37 [PATCH] x86: add SSE-based copy_page() Jan Beulich
2008-11-12 14:51 ` Dan Magenheimer
2008-11-12 15:01 ` Jan Beulich
2008-11-12 17:17 ` Dan Magenheimer
2008-11-13 8:37 ` Jan Beulich [this message]
2008-11-13 23:41 ` Dan Magenheimer
2008-11-14 3:08 ` Cui, Dexuan
2008-11-14 14:10 ` Dan Magenheimer
2008-11-14 14:16 ` Keir Fraser
2008-11-19 20:24 ` Dan Magenheimer
2008-11-19 21:21 ` Keir Fraser
2008-11-20 8:46 ` Jan Beulich
2009-01-12 23:29 ` Dan Magenheimer
2009-01-13 8:13 ` Keir Fraser
2009-01-13 8:34 ` Jan Beulich
2009-01-13 8:27 ` Jan Beulich
-- strict thread matches above, loose matches on Subject: below --
2009-01-13 8:31 Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=491BF556.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=dan.magenheimer@oracle.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.