X-Original-To: pgsql-ports-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id C06059FA293 for ; Fri, 12 May 2006 15:10:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 19766-01 for ; Fri, 12 May 2006 15:10:33 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 2AF2B9F946D for ; Fri, 12 May 2006 15:10:32 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k4CIAV48012676; Fri, 12 May 2006 14:10:31 -0400 (EDT) To: stange@rentec.com cc: Bruce Momjian , pgsql-ports@postgresql.org Subject: Re: solaris build problem with Sun compilers In-reply-to: <4464C950.40906@rentec.com> References: <200605112316.k4BNGeB17324@candle.pha.pa.us> <4463D639.3030802@rentec.com> <4464B653.1040301@rentec.com> <5470.1147451501@sss.pgh.pa.us> <4464C950.40906@rentec.com> Comments: In-reply-to Alan Stange message dated "Fri, 12 May 2006 13:43:44 -0400" Date: Fri, 12 May 2006 14:10:31 -0400 Message-ID: <12675.1147457431@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/29 X-Sequence-Number: 2410 Alan Stange writes: > Hmmm. I've just been looking at the last snapshot of the HEAD and > s_lock.h is still using an ldstub instruction instead of a cas for the > inlined tas() function when gcc is being used. Having a cas > instruction here would probably be an improvement too, right? [ shrug... ] The person who submitted the solaris_sparc.s change failed to provide any evidence that it was anything but cosmetic, so I didn't worry about changing the equivalent gcc code. If there's actually a performance win, please cite chapter and verse. Also, shouldn't we be worrying about breaking older Sparc chips? Does CAS go all the way back? > Finally, I noticed that pg_sleep is calling select() for a sleep. On > Solaris, this is a fairly expensive way to get off the run queue > compared to just calling nanosleep(). How often do backends go to > sleep here under "typical" workloads? If you actually reach that syscall you're screwed performance-wise anyhow. I'm disinclined to mess with OS-specific variants of the delay logic. regards, tom lane