From: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: John Naylor <johncnaylorls@gmail.com>
Cc: Andy Fan <zhihuifan1213@163.com>
Cc: Devulapalli, Raghuveer <raghuveer.devulapalli@intel.com>
Cc: Jesper Pedersen <jesperpedersen.db@gmail.com>
Cc: Tomas Vondra <tomas@vondra.me>
Cc: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
Cc: Shankaran, Akash <akash.shankaran@intel.com>
Subject: Re: Improve CRC32C performance on SSE4.2
Date: Mon, 23 Jun 2025 10:15:26 -0500
Message-ID: <aFlvjuCZGdRTUOPf@nathan> (raw)
In-Reply-To: <3353158.1750691445@sss.pgh.pa.us>
References: <CANWCAZZ+iVxz5QAadZrTCyps3Wewjy45POnqOkSi4KE_Y4YQtw@mail.gmail.com>
<PH8PR11MB8286A89AF2B104044187E54DFB70A@PH8PR11MB8286.namprd11.prod.outlook.com>
<aFCXO7MztuZezdpH@nathan>
<PH8PR11MB82866B07AA6758D12F699C00FB70A@PH8PR11MB8286.namprd11.prod.outlook.com>
<87bjqncl24.fsf@163.com>
<CANWCAZZK0hVk-N71JsuXPOB0ALy8BBOfRjSA4Nz2Kpt2RCLU0Q@mail.gmail.com>
<CANWCAZY01_SOeMjoz8UZrULysYhbkQMD_0YOGPfyM5vHZTw3SQ@mail.gmail.com>
<3350336.1750690281@sss.pgh.pa.us>
<aFltTRTPOvQYsAnD@nathan>
<3353158.1750691445@sss.pgh.pa.us>
On Mon, Jun 23, 2025 at 11:10:45AM -0400, Tom Lane wrote:
> Nathan Bossart <nathandbossart@gmail.com> writes:
>> On Mon, Jun 23, 2025 at 10:51:21AM -0400, Tom Lane wrote:
>>> This has broken the build completely on my RHEL8 x86_64 box,
>>> with gcc 8.5.0:
>
>> Unfortunately, this will probably require more than replacing
>> _mm512_castsi512_si128 with _mm512_zextsi512_si128 because the latter
>> doesn't exist.
>
> I was imagining just including _mm512_zextsi128_si512() in the
> code being tested during configure, so that we fall back to
> the non-AVX-512 code if the compiler is too old to have it.
> I don't really feel a need to work harder than that.
Sorry, my note wasn't clear. Right now, the configure test uses
_mm512_castsi512_si128(), so we can't just do a simple s/cast/zext. We'll
need to make a slightly bigger modification to the test to make sure the
zext intrinsics are understood. I agree that we needn't work any harder
than that.
--
nathan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, tgl@sss.pgh.pa.us, johncnaylorls@gmail.com, zhihuifan1213@163.com, raghuveer.devulapalli@intel.com, jesperpedersen.db@gmail.com, tomas@vondra.me, akash.shankaran@intel.com
Subject: Re: Improve CRC32C performance on SSE4.2
In-Reply-To: <aFlvjuCZGdRTUOPf@nathan>
References: <CANWCAZZ+iVxz5QAadZrTCyps3Wewjy45POnqOkSi4KE_Y4YQtw@mail.gmail.com> <PH8PR11MB8286A89AF2B104044187E54DFB70A@PH8PR11MB8286.namprd11.prod.outlook.com> <aFCXO7MztuZezdpH@nathan> <PH8PR11MB82866B07AA6758D12F699C00FB70A@PH8PR11MB8286.namprd11.prod.outlook.com> <87bjqncl24.fsf@163.com> <CANWCAZZK0hVk-N71JsuXPOB0ALy8BBOfRjSA4Nz2Kpt2RCLU0Q@mail.gmail.com> <CANWCAZY01_SOeMjoz8UZrULysYhbkQMD_0YOGPfyM5vHZTw3SQ@mail.gmail.com> <3350336.1750690281@sss.pgh.pa.us> <aFltTRTPOvQYsAnD@nathan> <3353158.1750691445@sss.pgh.pa.us> <aFlvjuCZGdRTUOPf@nathan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox