Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLWqw-0003DV-TK for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Jul 2016 14:34:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bLWqw-0005Lw-Gb for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Jul 2016 14:34:02 +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 1bLWpQ-0000MP-KP for pgsql-hackers@postgresql.org; Fri, 08 Jul 2016 14:32:36 +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 1bLWpL-0000NH-7A for pgsql-hackers@postgresql.org; Fri, 08 Jul 2016 14:32:24 +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 u68EWKVu010214; Fri, 8 Jul 2016 10:32:20 -0400 From: Tom Lane To: Greg Stark cc: Robert Haas , PostgreSQL-development Subject: Re: can we optimize STACK_DEPTH_SLOP In-reply-to: References: <32729.1467734050@sss.pgh.pa.us> <28549.1467748100@sss.pgh.pa.us> <19108.1467812089@sss.pgh.pa.us> <20280.1467855936@sss.pgh.pa.us> <20233.1467910511@sss.pgh.pa.us> <17417.1467949587@sss.pgh.pa.us> Comments: In-reply-to Greg Stark message dated "Fri, 08 Jul 2016 14:49:03 +0100" Date: Fri, 08 Jul 2016 10:32:20 -0400 Message-ID: <10213.1467988340@sss.pgh.pa.us> X-Pg-Spam-Score: -3.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 Greg Stark writes: > Searching for info on ia64 turned up this interesting thread: > https://www.postgresql.org/message-id/21563.1289064886%40sss.pgh.pa.us Yeah, that's the same one I referenced upthread ;-) > From that discussion it seems we should probably run these tests with > -O0 because the stack usage can be substantially higher without > optimizations. And it doesn't sound like ia64 uses much more *normal* > stack, just that there's the additional register stack. > It might not be unreasonable to commit the pmap hack, gather the data > from the build farm then later add an #ifdef around it. (or just make > it #ifdef USE_ASSERTIONS which I assume most build farm members are > running with anyways). Hmm. The two IA64 critters in the farm are running HPUX, which means they likely don't have pmap. But I could clean up the hack I used to gather stack size data on gaur's host and commit it temporarily. On non-HPUX platforms we could just try system("pmap -x") and see what happens; as long as we're ignoring the result it shouldn't cause anything really bad. I was going to object that this would probably not tell us anything about the worst-case IA64 stack usage, but I see that neither of those critters are selecting any optimization, so actually it would. So, agreed, let's commit some temporary debug code and see what the buildfarm can teach us. Will go work on that in a bit. > Alternatively it wouldn't be very hard to use mincore(2) to implement > it natively. I believe mincore is nonstandard but present in Linux and > BSD. Hm, after reading the man page I don't quite see how that would help? You'd have to already know the mapped stack address range in order to call the function without getting ENOMEM. 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