qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Robert Hoo <robert.hu@linux.intel.com>,
	qemu-devel@nongnu.org, pbonzini@redhat.com, laurent@vivier.eu,
	philmd@redhat.com, berrange@redhat.com
Cc: robert.hu@intel.com
Subject: Re: [PATCH 2/2] util: add util function buffer_zero_avx512()
Date: Mon, 24 Feb 2020 08:13:06 -0800	[thread overview]
Message-ID: <7b8fd7a0-9cb8-aab8-0f1b-4a77dd7a6378@linaro.org> (raw)
In-Reply-To: <160d077042713fc46b36650946712a43e6e89b51.camel@linux.intel.com>

On 2/23/20 11:07 PM, Robert Hoo wrote:
> Inspired by your suggestion, I'm thinking go further: use immediate
> rather than a global variable, so that saves 1 memory(/cache) access. 
> 
> #ifdef CONFIG_AVX512F_OPT   
> #define OPTIMIZE_LEN    256
> #else
> #define OPTIMIZE_LEN    64
> #endif

With that, the testing in tests/test-bufferiszero.c, looping through the
implementations, is invalidated.  Because once you start compiling for avx512,
you're no longer testing sse2 et al with the same inputs.

IF we want to change the length to suit avx512, we would want to change it
unconditionally.  And then you could also tidy up avx2 to avoid the extra
comparisons there.


r~


  reply	other threads:[~2020-02-24 16:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13  7:52 [PATCH 0/2] Add AVX512F optimization option and buffer_zero_avx512() Robert Hoo
2020-02-13  7:52 ` [PATCH 1/2] configure: add configure option avx512f_opt Robert Hoo
2020-02-13  7:52 ` [PATCH 2/2] util: add util function buffer_zero_avx512() Robert Hoo
2020-02-13 10:30   ` Paolo Bonzini
2020-02-13 11:58     ` Robert Hoo
2020-02-13 18:20   ` Richard Henderson
2020-02-24  7:07     ` Robert Hoo
2020-02-24 16:13       ` Richard Henderson [this message]
2020-02-25  7:34         ` Robert Hoo
2020-02-25 15:29           ` Richard Henderson
2020-02-13  8:40 ` [PATCH 0/2] Add AVX512F optimization option and buffer_zero_avx512() no-reply

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=7b8fd7a0-9cb8-aab8-0f1b-4a77dd7a6378@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=berrange@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=robert.hu@intel.com \
    --cc=robert.hu@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).