pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: Christoph Berg <myon@debian.org>
Cc: Tomas Vondra <tomas@vondra.me>
Cc: Andres Freund <andres@anarazel.de>
Cc: Tomas Vondra <tomas.vondra@postgresql.org>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Introduce pg_shmem_allocations_numa view
Date: Thu, 26 Jun 2025 05:28:22 +0000
Message-ID: <aFzadttaX+Qnb5s3@ip-10-97-1-34.eu-west-3.compute.internal> (raw)
In-Reply-To: <aFu6tmQ7EVaaNV9K@msg.df7cb.de>
References: <b54df21b-6595-4031-baf8-7c87851794c8@vondra.me>
	<aFuRoUieUVh+pMfZ@ip-10-97-1-34.eu-west-3.compute.internal>
	<aFu6tmQ7EVaaNV9K@msg.df7cb.de>

Hi,

On Wed, Jun 25, 2025 at 11:00:38AM +0200, Christoph Berg wrote:
> Re: Bertrand Drouvot
> > +/*
> > + * Work around Linux kernel bug in 32-bit compat mode: do_pages_stat() has
> > + * incorrect pointer arithmetic for more than DO_PAGES_STAT_CHUNK_NR pages.
> > + */
> > +#if SIZEOF_SIZE_T == 4
> 
> I was also missing it in my suggested patch draft, but this should
> probably include #ifdef __linux__.

I'm not sure because the workaround is after this part of the code in pg_numa.c:

"
/*
 * At this point we provide support only for Linux thanks to libnuma, but in
 * future support for other platforms e.g. Win32 or FreeBSD might be possible
 * too. For Win32 NUMA APIs see
 * https://learn.microsoft.com/en-us/windows/win32/procthread/numa-support
 */
#ifdef USE_LIBNUMA
"

So I guess that the "#ifdef __linux__" would have to be at a higher level anyway
(should we support NUMA on more than Linux in the future).

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com





view thread (54+ messages)  latest in thread

Message-ID: <aFzadttaX+Qnb5s3@ip-10-97-1-34.eu-west-3.compute.internal>
Permalink:  ../aFzadttaX+Qnb5s3@ip-10-97-1-34.eu-west-3.compute.internal/
Also on:    postgresql.org/message-id/aFzadttaX+Qnb5s3@ip-10-97-1-34.eu-west-3.compute.internal

 · 

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-committers@postgresql.org
  Cc: bertranddrouvot.pg@gmail.com, myon@debian.org, tomas@vondra.me, andres@anarazel.de, tomas.vondra@postgresql.org, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgsql: Introduce pg_shmem_allocations_numa view
  In-Reply-To: <aFzadttaX+Qnb5s3@ip-10-97-1-34.eu-west-3.compute.internal>
  References: <b54df21b-6595-4031-baf8-7c87851794c8@vondra.me> <aFuRoUieUVh+pMfZ@ip-10-97-1-34.eu-west-3.compute.internal> <aFu6tmQ7EVaaNV9K@msg.df7cb.de> <aFzadttaX+Qnb5s3@ip-10-97-1-34.eu-west-3.compute.internal>

* 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