public inbox for [email protected]  
help / color / mirror / Atom feed
From: Thomas Munro <[email protected]>
To: Nathan Bossart <[email protected]>
Cc: Greg Burd <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: Dave Cramer <[email protected]>
Subject: Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB ?barriers
Date: Wed, 17 Dec 2025 14:57:14 +1300
Message-ID: <CA+hUKG+-ESmkaDZ4a_S--UoJ2soVRgsa6uem7REM7LuYxk5xFg@mail.gmail.com> (raw)
In-Reply-To: <aUHR3eSjkaBjaUAB@nathan>
References: <aTw8tb_eIpDBYHfW@nathan>
	<[email protected]>
	<sxhkd5ucchq4vululj6xiwkrd6tsxh53gjiku2knjnqalglumc@hs4vp3b7e7by>
	<[email protected]>
	<aUB_6ZNFRtjM7FVS@nathan>
	<qu3uuja2u3uerwmbhvz6pscdhlhdm3xa3d4nc7lr7vvpowarzl@yn45ne6635ml>
	<aUCTH8oP4Wj4r58P@nathan>
	<[email protected]>
	<[email protected]>
	<aUGf5oyzguybiUBB@nathan>
	<aUHR3eSjkaBjaUAB@nathan>

On Wed, Dec 17, 2025 at 10:40 AM Nathan Bossart
<[email protected]> wrote:
> 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.

The LLVM code has never run on Windows and will likely need
patching... I know of at least one change required and will write
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.

Assuming you haven't blocked OS updates, Windows stopped booting on
pre-ARMv8.1 hardware a while back.  RPi4's Broadcom chip and the
Snapdragon 835 (found in the oldest Windows laptops, according to a
quick Google search) are ARMv8-A only, but did actually have the CRC32
instructions, so it would actually work anyway.  They also have the
optional NEON SIMD stuff, which we use unconditionally:

/*
 * We use the Neon instructions if the compiler provides access to them (as
 * indicated by __ARM_NEON) and we are on aarch64.  While Neon support is
 * technically optional for aarch64, it appears that all available 64-bit
 * hardware does have it.  Neon exists in some 32-bit hardware too, but we
 * could not realistically use it there without a run-time check, which seems
 * not worth the trouble for now.
 */

A single chip in this report lacked FEAT_CRC32, the X-Gene 1 from 2012:

https://gpages.juszkiewicz.com.pl/arm-socs-table/arm-socs.html

So I don't think it's worth worrying about, I was just mentioning the
"Windows 11 requires CRC32, Windows 10 is dead" thing to avoid Greg
being forced to waste time researching the missing feature test code
:-)  The reason Windows can't boot on old ARM chips probably has more
to do with the modern atomics needed for decent lock performance,
which every kernel wants.





view thread (42+ messages)  latest in thread

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB ?barriers
  In-Reply-To: <CA+hUKG+-ESmkaDZ4a_S--UoJ2soVRgsa6uem7REM7LuYxk5xFg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox