From: "Jiang, Haochen" <haochen.jiang@intel.com>
To: "Jiang, Haochen" <haochen.jiang@intel.com>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: "Liu, Hongtao" <hongtao.liu@intel.com>,
"ubizjak@gmail.com" <ubizjak@gmail.com>, Jan Hubicka <jh@suse.cz>,
Richard Biener <richard.guenther@gmail.com>
Subject: RE: [PATCH 0/2] Align tight loops to solve cross cacheline issue
Date: Wed, 15 May 2024 03:30:05 +0000 [thread overview]
Message-ID: <SA1PR11MB594645B11B2F534B46535EF5ECEC2@SA1PR11MB5946.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20240515030429.2575440-1-haochen.jiang@intel.com>
Also cc Honza and Richard since we touched generic tune.
Thx,
Haochen
> -----Original Message-----
> From: Haochen Jiang <haochen.jiang@intel.com>
> Sent: Wednesday, May 15, 2024 11:04 AM
> To: gcc-patches@gcc.gnu.org
> Cc: Liu, Hongtao <hongtao.liu@intel.com>; ubizjak@gmail.com
> Subject: [PATCH 0/2] Align tight loops to solve cross cacheline issue
>
> Hi all,
>
> Recently, we have encountered several random performance regressions in
> benchmarks commit to commit. It is caused by cross cacheline issue for tight
> loops.
>
> We are trying to solve the issue by two patches. One is adjusting the loop
> alignment for generic tune, the other is aligning tight and hot loops more
> aggressively.
>
> For SPECINT, we get a 0.85% improvement overall in rates, under option
> -O2 -march=x86-64-v3 -mtune=generic on Emerald Rapids.
>
> BenchMarks EMR Rates
> 500.perlbench_r -1.21%
> 502.gcc_r 0.78%
> 505.mcf_r 0.00%
> 520.omnetpp_r 0.41%
> 523.xalancbmk_r 1.33%
> 525.x264_r 2.83%
> 531.deepsjeng_r 1.11%
> 541.leela_r 0.00%
> 548.exchange2_r 2.36%
> 557.xz_r 0.98%
> Geomean-int 0.85%
>
> Side effect is that we get a 1.40% increase in codesize.
>
> BenchMarks EMR Codesize
> 500.perlbench_r 0.70%
> 502.gcc_r 0.67%
> 505.mcf_r 3.26%
> 520.omnetpp_r 0.31%
> 523.xalancbmk_r 1.15%
> 525.x264_r 1.11%
> 531.deepsjeng_r 1.40%
> 541.leela_r 1.31%
> 548.exchange2_r 3.06%
> 557.xz_r 1.04%
> Geomean-int 1.40%
>
> Bootstrapped and regtested on x86_64-pc-linux-gnu.
>
> After we committed into trunk for a month, if there isn't any unexpected
> happen. We planned to backport it to GCC14.2.
>
> Thx,
> Haochen
>
> Haochen Jiang (1):
> Adjust generic loop alignment from 16:11:8 to 16 for Intel processors
>
> liuhongt (1):
> Align tight&hot loop without considering max skipping bytes.
>
> gcc/config/i386/i386.cc | 148 ++++++++++++++++++++++++++++++-
> gcc/config/i386/i386.md | 10 ++-
> gcc/config/i386/x86-tune-costs.h | 2 +-
> 3 files changed, 154 insertions(+), 6 deletions(-)
>
> --
> 2.31.1
next prev parent reply other threads:[~2024-05-15 3:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-15 3:04 Haochen Jiang
2024-05-15 3:04 ` [PATCH 1/2] Adjust generic loop alignment from 16:11:8 to 16 for Intel processors Haochen Jiang
2024-05-15 3:04 ` [PATCH 2/2] Align tight&hot loop without considering max skipping bytes Haochen Jiang
2024-05-15 3:30 ` Jiang, Haochen [this message]
2024-05-20 3:15 ` [PATCH 0/2] Align tight loops to solve cross cacheline issue Hongtao Liu
2024-05-27 1:33 ` Hongtao Liu
2024-05-29 3:30 ` Jiang, Haochen
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=SA1PR11MB594645B11B2F534B46535EF5ECEC2@SA1PR11MB5946.namprd11.prod.outlook.com \
--to=haochen.jiang@intel.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hongtao.liu@intel.com \
--cc=jh@suse.cz \
--cc=richard.guenther@gmail.com \
--cc=ubizjak@gmail.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 read-only IMAP folder(s) and NNTP newsgroup(s).