Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB ?barriers

From: Andres Freund <andres(at)anarazel(dot)de>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Greg Burd <greg(at)burd(dot)me>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Dave Cramer <davecramer(at)gmail(dot)com>
Subject: Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB ?barriers
Date: 2025-12-16 22:36:13
Message-ID: 65bu2jkrl56hzyfmdj3rwfwpea7bvdvq3o4nvp6ycgdyro3tko@yfwr63uopdte
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2025-12-16 15:40:45 -0600, Nathan Bossart wrote:
> On Tue, Dec 16, 2025 at 12:07:34PM -0600, Nathan Bossart wrote:
> > Here's what I have staged for commit. I searched around for anything else
> > that might be missing, and I only found a couple of small things. First,
> > there are some optional AArch64 optimizations (simd.h and popcount) that
> > likely need more work, but those can wait for now.
>
> Hm. I think the USE_LLVM_BACKPORT_SECTION_MEMORY_MANAGER thing might need
> work, too. We don't have any Windows buildfarm machines with LLVM enabled,
> but IIUC it should be possible. Perhaps we can add that to unicorn.

I don't think LLVM ever was in use on windows. With the old src/tools/msvc
stuff it wasn't supported, and I don't know if anybody tested it with meson.

I don't think this patch/thread needs to worry about that.

> > Also, while the patch
> > is targeting Windows 11 (IIUC), there are some notes in the docs that give
> > the impression Windows 10 is supported, too [0]. I could easily change it
> > to say that AArch64 requires Windows 11, but I don't know what to do with
> > the references to specific versions of Visual Studio and the Windows SDK.
>
> Actually, I'm not sure there's anything specific to Windows 11 in this
> patch, besides perhaps the choice to set USE_ARMV8_CRC32C unconditionally.
> I don't know how likely it is that someone will try to run Postgres on
> Windows on an AArch64 machine without CRC extension support, though.

I think it's vanishingly unlikely. Windows 10 is out of support and windows
ARM support is pretty new. I doubt there's any windows capable armv8 hardware
without the relevant extension.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2025-12-16 22:44:28 Re: pg_dump: Remove trivial usage of PQExpBuffer
Previous Message Corey Huinker 2025-12-16 22:03:13 pg_dump: Remove trivial usage of PQExpBuffer