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, chao.p.peng@intel.com
Subject: Re: [PATCH v2 2/2] util: add util function buffer_zero_avx512()
Date: Thu, 27 Feb 2020 05:23:02 -0800 [thread overview]
Message-ID: <a027778f-08a9-a7f9-68b6-a6dab19e7e3d@linaro.org> (raw)
In-Reply-To: <1582688142-113997-3-git-send-email-robert.hu@linux.intel.com>
On 2/25/20 7:35 PM, Robert Hoo wrote:
> @@ -226,10 +263,16 @@ static void init_accel(unsigned cache)
> fn = buffer_zero_avx2;
> }
> #endif
> +#ifdef CONFIG_AVX512F_OPT
> + if (cache & CACHE_AVX512F) {
> + fn = buffer_zero_avx512;
> + length_to_accel = 256;
> + }
> +#endif
> buffer_accel = fn;
> }
The other cases within init_accel should also set the length. Otherwise, when
unit testing, sse2 will also see 256.
Recall that unit testing is done in order of
> +#define CACHE_AVX512F 1
> +#define CACHE_AVX2 2
> +#define CACHE_SSE4 4
> +#define CACHE_SSE2 8
Otherwise this looks ok.
r~
prev parent reply other threads:[~2020-02-27 13:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-26 3:35 [PATCH v2 0/2] Add AVX512F optimization option and buffer_zero_avx512() Robert Hoo
2020-02-26 3:35 ` [PATCH v2 1/2] configure: introduce configure option avx512f Robert Hoo
2020-02-26 3:35 ` [PATCH v2 2/2] util: add util function buffer_zero_avx512() Robert Hoo
2020-02-27 13:23 ` Richard Henderson [this message]
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=a027778f-08a9-a7f9-68b6-a6dab19e7e3d@linaro.org \
--to=richard.henderson@linaro.org \
--cc=berrange@redhat.com \
--cc=chao.p.peng@intel.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).