From: Toshi Kani <toshi.kani@hpe.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, x86@kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Borislav Petkov <bp@suse.de>,
"Luis R. Rodriguez" <mcgrof@suse.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Ross Zwisler <ross.zwisler@linux.intel.com>,
Sai Praneeth <sai.praneeth.prakhya@intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: Micro-optimise clflush_cache_range()
Date: Fri, 08 Jan 2016 11:25:57 -0700 [thread overview]
Message-ID: <1452277557.19330.64.camel@hpe.com> (raw)
In-Reply-To: <1452246933-10890-1-git-send-email-chris@chris-wilson.co.uk>
On Fri, 2016-01-08 at 09:55 +0000, Chris Wilson wrote:
> Whilst inspecting the asm for clflush_cache_range() and some perf
> profiles
> that required extensive flushing of single cachelines (from part of the
> intel-gpu-tools GPU benchmarks), we noticed that gcc was reloading
> boot_cpu_data.x86_clflush_size on every iteration of the loop. We can
> manually hoist that read which perf regarded as taking ~25% of the
> function time for a single cacheline flush.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: x86@kernel.org
> Cc: Toshi Kani <toshi.kani@hpe.com>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: "Luis R. Rodriguez" <mcgrof@suse.com>
> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
> Cc: Sai Praneeth <sai.praneeth.prakhya@intel.com>
> Cc: linux-kernel@vger.kernel.org
> Acked-by: "H. Peter Anvin" <hpa@zytor.com>
Thanks for the improvement! The change looks good to me.
Reviewed-by: Toshi Kani <toshi.kani@hpe.com>
-Toshi
next prev parent reply other threads:[~2016-01-08 18:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-08 9:55 [PATCH] x86: Micro-optimise clflush_cache_range() Chris Wilson
2016-01-08 16:58 ` Ross Zwisler
2016-01-08 18:25 ` Toshi Kani [this message]
2016-01-08 18:30 ` [tip:x86/mm] x86/mm: " tip-bot for Chris Wilson
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=1452277557.19330.64.camel@hpe.com \
--to=toshi.kani@hpe.com \
--cc=bp@suse.de \
--cc=chris@chris-wilson.co.uk \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@suse.com \
--cc=mingo@redhat.com \
--cc=ross.zwisler@linux.intel.com \
--cc=sai.praneeth.prakhya@intel.com \
--cc=sfr@canb.auug.org.au \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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.