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 1uTiy4-008vDt-QW for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Jun 2025 15:20:20 +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 1uTiy2-004ALk-Pi for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Jun 2025 15:20:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uTiy2-004ALb-GD for pgsql-hackers@lists.postgresql.org; Mon, 23 Jun 2025 15:20:19 +0000 Received: from mout-p-103.mailbox.org ([80.241.56.161]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uTiy0-003f0O-24 for pgsql-hackers@lists.postgresql.org; Mon, 23 Jun 2025 15:20:18 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::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 4bQsG60TBVz9srN; Mon, 23 Jun 2025 17:20:14 +0200 (CEST) Date: Mon, 23 Jun 2025 17:20:12 +0200 From: Christoph Berg To: Andres Freund Cc: Tomas Vondra , pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Introduce pg_shmem_allocations_numa view Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4bQsG60TBVz9srN List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Re: Andres Freund > > > Why do we try to force the pages to be allocated at all? This is just > > > a monitoring function, it should not change the actual system state. > > The problem is that the kernel function just gives bogus results for pages > that *are* present in memory but that have only touched in another process > that has mapped the same range of memory. Ok, so we leave the touching in, but still defend against negative status values? Christoph