Re: Optimize Arm64 crc32c implementation in Postgresql

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Yuqi Gu <Yuqi(dot)Gu(at)arm(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Optimize Arm64 crc32c implementation in Postgresql
Date: 2018-04-04 11:47:11
Message-ID: CAEepm=02Run-Pk3xyt+RV3p1N+7cKZxN95_MamaJw8Cnw+DwjQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 4, 2018 at 11:21 PM, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
> Yep. I got the code before the main loop, to handle the first 1-7 unaligned
> bytes, wrong. Apparently those are the only tests that call the CRC function
> with very short and unaligned input.

BTW I did some googling just now and found out that some libraries use
a technique they call "CPU probing": just try it and see if you get
SIGILL. Is that a bad idea for some reason? Here is a quick hack --
anyone got an ARM system without crc that they could test it on?

--
Thomas Munro
http://www.enterprisedb.com

Attachment Content-Type Size
cpu-probe-hack.patch application/octet-stream 1.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikhil Sontakke 2018-04-04 11:58:54 Re: [HACKERS] logical decoding of two-phase transactions
Previous Message Dmitry Dolgov 2018-04-04 11:27:16 Re: json(b)_to_tsvector with numeric values