On 09.07.26 22:50, Nathan Bossart wrote:
The attached patch set converts various variables to atomics, thereby
allowing us to remove a handful of spinlocks and volatile qualifiers.
We've been slowly moving in this direction for a while already.  I think
all of these are pretty straightforward and easy to reason about.

A number of these change signed integers to unsigned integers. Maybe this doesn't matter in some cases, but it should be analyzed in more detail.

Here is an instance that seems obviously wrong:

/* Buffer id of the buffer that Startup process waits for pin on, or -1 */
-       int                     startupBufferPinWaitBufId;
+       pg_atomic_uint32 startupBufferPinWaitBufId;



Reply via email to