All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Cc: qemu-ppc@nongnu.org, rth@twiddle.net, qemu-devel@nongnu.org,
	benh@kernel.crashing.org
Subject: Re: [Qemu-devel] [PATCH v4 4/9] target-ppc: improve lxvw4x implementation
Date: Thu, 29 Sep 2016 13:55:33 +1000	[thread overview]
Message-ID: <20160929035533.GJ8390@umbus.fritz.box> (raw)
In-Reply-To: <87eg43v0dl.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me>

[-- Attachment #1: Type: text/plain, Size: 2756 bytes --]

On Thu, Sep 29, 2016 at 09:11:10AM +0530, Nikunj A Dadhania wrote:
> David Gibson <david@gibson.dropbear.id.au> writes:
> 
> > [ Unknown signature status ]
> > On Wed, Sep 28, 2016 at 11:01:22AM +0530, Nikunj A Dadhania wrote:
> >> Load 8byte at a time and manipulate.
> >> 
> >> Big-Endian Storage
> >> +-------------+-------------+-------------+-------------+
> >> | 00 11 22 33 | 44 55 66 77 | 88 99 AA BB | CC DD EE FF |
> >> +-------------+-------------+-------------+-------------+
> >> 
> >> Little-Endian Storage
> >> +-------------+-------------+-------------+-------------+
> >> | 33 22 11 00 | 77 66 55 44 | BB AA 99 88 | FF EE DD CC |
> >> +-------------+-------------+-------------+-------------+
> >> 
> >> Vector load results in:
> >> +-------------+-------------+-------------+-------------+
> >> | 00 11 22 33 | 44 55 66 77 | 88 99 AA BB | CC DD EE FF |
> >> +-------------+-------------+-------------+-------------+
> >
> > Ok.  I'm guessing from this that implementing those GPR<->VSR
> > instructions showed that the earlier versions were endian-incorrect as
> > I suspected.
> >
> > Have you verified that this new implementation is actually faster (or
> > at least no slower) on LE than the original implementation with
> > individual 32-bit stores?
> 
> Result of million lxvw4x, mfvsrd/mfvsrld and print
> 
> Without patch:
> ==============
> [tcg_test]$ time ../qemu/ppc64le-linux-user/qemu-ppc64le  -cpu POWER9 le_lxvw4x  >/dev/null
> real	0m2.812s
> user	0m2.792s
> sys	0m0.020s
> [tcg_test]$
> 
> With patch:
> ===========
> [tcg_test]$ time ../qemu/ppc64le-linux-user/qemu-ppc64le  -cpu POWER9 le_lxvw4x  >/dev/null
> real	0m2.801s
> user	0m2.783s
> sys	0m0.018s
> [tcg_test]$
> 
> Not much perceivable difference, is there a better way to benchmark?

Not dramatically, that I can think of.  A few tweaks you can make:
    * Increase the loop counter so the test simply runs for longer
    * Also run the test multiple times, so you can get an idea of how
      much the results vary from one run to another
    * Run the test on a system that's as idle of other activity as you
      can make it (at both host and guest level).

For out purposes the user time is probably the meaningful thing here,
and should show less variance than the system and real time.

Note that it would be interesting to get these results for both a
power and x86 host.

In any case the results above are enough to convince me that the
change isn't likely to be a significant regression.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-09-29  4:23 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28  5:31 [Qemu-devel] [PATCH v4 0/9] POWER9 TCG enablements - part4 Nikunj A Dadhania
2016-09-28  5:31 ` [Qemu-devel] [PATCH v4 1/9] target-ppc: Implement mfvsrld instruction Nikunj A Dadhania
2016-09-28 16:03   ` Richard Henderson
2016-09-28  5:31 ` [Qemu-devel] [PATCH v4 2/9] target-ppc: Implement mtvsrdd instruction Nikunj A Dadhania
2016-09-28 16:01   ` Richard Henderson
2016-09-28 17:06     ` Nikunj A Dadhania
2016-09-29  1:29   ` David Gibson
2016-09-29  3:20     ` Nikunj A Dadhania
2016-09-28  5:31 ` [Qemu-devel] [PATCH v4 3/9] target-ppc: Implement mtvsrws instruction Nikunj A Dadhania
2016-09-28 16:04   ` Richard Henderson
2016-09-28  5:31 ` [Qemu-devel] [PATCH v4 4/9] target-ppc: improve lxvw4x implementation Nikunj A Dadhania
2016-09-28 16:07   ` Richard Henderson
2016-09-29  1:38   ` David Gibson
2016-09-29  2:34     ` Nikunj A Dadhania
2016-09-29  3:41     ` Nikunj A Dadhania
2016-09-29  3:48       ` Richard Henderson
2016-09-29  3:57         ` David Gibson
2016-09-29  3:55       ` David Gibson [this message]
2016-09-28  5:31 ` [Qemu-devel] [PATCH v4 5/9] target-ppc: improve stxvw4x implementation Nikunj A Dadhania
2016-09-28 16:08   ` Richard Henderson
2016-09-28  5:31 ` [Qemu-devel] [PATCH v4 6/9] target-ppc: add lxvh8x instruction Nikunj A Dadhania
2016-09-28 16:12   ` Richard Henderson
2016-09-28 17:11     ` Nikunj A Dadhania
2016-09-28 17:22       ` Richard Henderson
2016-09-28  5:31 ` [Qemu-devel] [PATCH v4 7/9] target-ppc: add stxvh8x instruction Nikunj A Dadhania
2016-09-28 16:13   ` Richard Henderson
2016-09-28  5:31 ` [Qemu-devel] [PATCH v4 8/9] target-ppc: add lxvb16x instruction Nikunj A Dadhania
2016-09-28 16:13   ` Richard Henderson
2016-09-28  5:31 ` [Qemu-devel] [PATCH v4 9/9] target-ppc: add stxvb16x instruction Nikunj A Dadhania
2016-09-28 16:13   ` Richard Henderson
2016-09-28  5:38 ` [Qemu-devel] [PATCH v4 0/9] POWER9 TCG enablements - part4 Nikunj A Dadhania
2016-09-28  9:28 ` [Qemu-devel] [Qemu-ppc] " Thomas Huth
2016-09-28 11:34   ` Nikunj A Dadhania

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=20160929035533.GJ8390@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=benh@kernel.crashing.org \
    --cc=nikunj@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rth@twiddle.net \
    /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.