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 1uU5bD-00FOyM-Id for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Jun 2025 15:30:15 +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 1uU5bB-00DARw-Lv for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Jun 2025 15:30:14 +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 1uU5bB-00DARH-CM for pgsql-hackers@lists.postgresql.org; Tue, 24 Jun 2025 15:30:14 +0000 Received: from mout-p-201.mailbox.org ([2001:67c:2050:0:465::201]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uU5b7-003qat-2h for pgsql-hackers@lists.postgresql.org; Tue, 24 Jun 2025 15:30:12 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (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-201.mailbox.org (Postfix) with ESMTPS id 4bRTR023KTz9tgX; Tue, 24 Jun 2025 17:30:04 +0200 (CEST) Date: Tue, 24 Jun 2025 17:30:02 +0200 From: Christoph Berg To: Tomas Vondra Cc: Bertrand Drouvot , Andres Freund , Tomas Vondra , pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Introduce pg_shmem_allocations_numa view Message-ID: References: <6342f601-77de-4ee0-8c2a-3deb50ceac5b@vondra.me> <8649a4e3-c60d-4f37-aa6f-e7e7c14c581e@vondra.me> <8961c087-e49b-4b16-9437-31331625215c@vondra.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8961c087-e49b-4b16-9437-31331625215c@vondra.me> X-Rspamd-Queue-Id: 4bRTR023KTz9tgX List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Re: Tomas Vondra > If it's a reliable fix, then I guess we can do it like this. But won't > that be a performance penalty on everyone? Or does the system split the > array into 16-element chunks anyway, so this makes no difference? There's still the overhead of the syscall itself. But no idea how costly it is to have this 16-step loop in user or kernel space. We could claim that on 32-bit systems, shared_buffers would be smaller anyway, so there the overhead isn't that big. And the step size should be larger (if at all) on 64-bit. > Anyway, maybe we should start by reporting this to the kernel people. Do > you want me to do that, or shall one of you take care of that? I suppose > that'd be better, as you already wrote a fix / know the code better. Submitted: https://marc.info/?l=linux-mm&m=175077821909222&w=2 Christoph