pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: John Naylor <johncnaylorls@gmail.com>
Cc: Andy Fan <zhihuifan1213@163.com>
Cc: Devulapalli, Raghuveer <raghuveer.devulapalli@intel.com>
Cc: Nathan Bossart <nathandbossart@gmail.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:51:21 -0400
Message-ID: <3350336.1750690281@sss.pgh.pa.us> (raw)
In-Reply-To: <CANWCAZY01_SOeMjoz8UZrULysYhbkQMD_0YOGPfyM5vHZTw3SQ@mail.gmail.com>
References: <CANWCAZYsfyjcrjhL--zMTV4ERiR3rDGiVZHs_-0y9enc38qtsw@mail.gmail.com>
	<Z_BZ_Xxdu9E2r8SH@nathan>
	<CANWCAZa_iAhjd-6TVY5NfDzyoSJxFgsMrPW0YwKuTMF7a75D9g@mail.gmail.com>
	<87o6uqd3iv.fsf@163.com>
	<e98f1e23-b05b-43e4-a3a1-0967df12ada4@vondra.me>
	<aE1_knL40G9Wq_zp@nathan>
	<029f0848-8bc2-4d99-aebd-345949f97622@gmail.com>
	<87frg1dc3k.fsf@163.com>
	<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>

John Naylor <johncnaylorls@gmail.com> writes:
> Pushed, thanks everyone!

This has broken the build completely on my RHEL8 x86_64 box,
with gcc 8.5.0:

$ ./configure ...
$ make -s
pg_crc32c_sse42.c: In function 'pg_comp_crc32c_avx512':
pg_crc32c_sse42.c:126:25: warning: implicit declaration of function '_mm512_zextsi128_si512'; did you mean '_mm512_castsi128_si512'? [-Wimplicit-function-declaration]
   x0 = _mm512_xor_si512(_mm512_zextsi128_si512(_mm_cvtsi32_si128(crc0)), x0);
                         ^~~~~~~~~~~~~~~~~~~~~~
                         _mm512_castsi128_si512
pg_crc32c_sse42.c:126:25: error: incompatible type for argument 1 of '_mm512_xor_si512'
   x0 = _mm512_xor_si512(_mm512_zextsi128_si512(_mm_cvtsi32_si128(crc0)), x0);
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-redhat-linux/8/include/immintrin.h:45,
                 from pg_crc32c_sse42.c:19:
/usr/lib/gcc/x86_64-redhat-linux/8/include/avx512fintrin.h:7267:27: note: expected '__m512i' {aka '__vector(8) long long int'} but argument is of type 'int'
 _mm512_xor_si512 (__m512i __A, __m512i __B)
                   ~~~~~~~~^~~
make[2]: *** [<builtin>: pg_crc32c_sse42.o] Error 1

I see similar symptoms on buildfarm animal conchuela, which
is DragonFly BSD of some vintage or other.  Not sure why
more animals aren't complaining.  Anyway, it seems that the
configure probe to see if this facility is available had
better be adjusted to match the new code.

			regards, tom lane





view thread (82+ messages)  latest in thread

Message-ID: <3350336.1750690281@sss.pgh.pa.us>
Permalink:  ../3350336.1750690281@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3350336.1750690281@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, johncnaylorls@gmail.com, zhihuifan1213@163.com, raghuveer.devulapalli@intel.com, nathandbossart@gmail.com, jesperpedersen.db@gmail.com, tomas@vondra.me, akash.shankaran@intel.com
  Subject: Re: Improve CRC32C performance on SSE4.2
  In-Reply-To: <3350336.1750690281@sss.pgh.pa.us>
  References: <CANWCAZYsfyjcrjhL--zMTV4ERiR3rDGiVZHs_-0y9enc38qtsw@mail.gmail.com> <Z_BZ_Xxdu9E2r8SH@nathan> <CANWCAZa_iAhjd-6TVY5NfDzyoSJxFgsMrPW0YwKuTMF7a75D9g@mail.gmail.com> <87o6uqd3iv.fsf@163.com> <e98f1e23-b05b-43e4-a3a1-0967df12ada4@vondra.me> <aE1_knL40G9Wq_zp@nathan> <029f0848-8bc2-4d99-aebd-345949f97622@gmail.com> <87frg1dc3k.fsf@163.com> <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>

* 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