Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uULzx-001vVW-LH for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Jun 2025 09:00:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uULzv-001cGE-Nh for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Jun 2025 09:00:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uULzv-001cG6-EZ for pgsql-hackers@lists.postgresql.org; Wed, 25 Jun 2025 09:00:52 +0000 Received: from mout-p-103.mailbox.org ([2001:67c:2050:0:465::103]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uULzt-003swC-35 for pgsql-hackers@lists.postgresql.org; Wed, 25 Jun 2025 09:00:51 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4bRwlG1GwHz9sc8; Wed, 25 Jun 2025 11:00:42 +0200 (CEST) Date: Wed, 25 Jun 2025 11:00:38 +0200 From: Christoph Berg To: Bertrand Drouvot , Tomas Vondra Cc: Andres Freund , Tomas Vondra , pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Introduce pg_shmem_allocations_numa view Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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__. Re: Tomas Vondra > +#ifdef USE_VALGRIND > + > +static inline void > +pg_numa_touch_mem_if_required(uint64 tmp, char *ptr) Stupid question, if this function gets properly inlined, why not always use it as there should be no performance difference vs using a macro? Christoph