Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buQF5-0005EX-5o for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Oct 2016 20:35:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1buQF4-0004ih-OX for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Oct 2016 20:35:10 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1buQDg-00038H-Uz for pgsql-hackers@postgresql.org; Wed, 12 Oct 2016 20:33:45 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1buQDe-0007dx-1B for pgsql-hackers@postgresql.org; Wed, 12 Oct 2016 20:33:43 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u9CKXcoG031427; Wed, 12 Oct 2016 16:33:38 -0400 From: Tom Lane To: Andres Freund cc: pgsql-hackers@postgresql.org Subject: Re: munmap() failure due to sloppy handling of hugepage size In-reply-to: <25C01331-B1AE-45A6-BD1F-D8AE2DE40F86@anarazel.de> References: <31056.1476303954@sss.pgh.pa.us> <25C01331-B1AE-45A6-BD1F-D8AE2DE40F86@anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 12 Oct 2016 13:28:38 -0700" Date: Wed, 12 Oct 2016 16:33:38 -0400 Message-ID: <31426.1476304418@sss.pgh.pa.us> X-Pg-Spam-Score: -2.2 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andres Freund writes: > On October 12, 2016 1:25:54 PM PDT, Tom Lane wrote: >> A little bit of research suggests that on Linux the thing to do would >> be to get the actual default hugepage size by reading /proc/meminfo and >> looking for a line like "Hugepagesize: 2048 kB". > We had that, but Heikki ripped it out when merging... I think you're supposed to use /sys to get the available size. According to https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt looking into /proc/meminfo is the longer-standing API and thus is likely to work on more kernel versions. Also, if you look into /sys then you are going to see multiple possible values and it's not clear how to choose the right one. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers