public inbox for [email protected]  
help / color / mirror / Atom feed
From: Christoph Berg <[email protected]>
Subject: [PATCH v2] Accept unmapped NUMA pages
Date: Mon, 23 Jun 2025 17:50:41 +0200

We are touching all shared memory pages so move_pages can report their
status from our address space, but this might still leave some status
numbers to be negative error codes; -14 (EFAULT) was seen on 32-bit
Linux. Instead of erroring out, skip over these entries.
---
 src/backend/storage/ipc/shmem.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/backend/storage/ipc/shmem.c b/src/backend/storage/ipc/shmem.c
index c9ae3b45b76..21c1e5b2d62 100644
--- a/src/backend/storage/ipc/shmem.c
+++ b/src/backend/storage/ipc/shmem.c
@@ -700,13 +700,8 @@ pg_get_shmem_allocations_numa(PG_FUNCTION_ARGS)
 			int			s = pages_status[i];
 
 			/* Ensure we are adding only valid index to the array */
-			if (s < 0 || s > max_nodes)
-			{
-				elog(ERROR, "invalid NUMA node id outside of allowed range "
-					 "[0, " UINT64_FORMAT "]: %d", max_nodes, s);
-			}
-
-			nodes[s]++;
+			if (s >= 0 && s <= max_nodes)
+				nodes[s]++;
 		}
 
 		/*
-- 
2.47.2


--nT8dEFd4v/xnwLii--





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]
  Subject: Re: [PATCH v2] Accept unmapped NUMA pages
  In-Reply-To: <no-message-id-387@localhost>

* 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