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 A2C6A9FA1B0 for ; Fri, 12 May 2006 14:43:58 -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 17377-01 for ; Fri, 12 May 2006 14:43:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from centaur.rentec.com (centaur.rentec.com [216.223.240.8]) by postgresql.org (Postfix) with ESMTP id D96309F946D for ; Fri, 12 May 2006 14:43:52 -0300 (ADT) Received: from ram.rentec.com (ram [192.5.35.66]) by centaur.rentec.com (8.13.6/8.12.1) with ESMTP id k4CHhkQw025485 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 May 2006 13:43:46 -0400 (EDT) X-Source: non-mednet Received: from [172.26.132.145] (hoopoe.rentec.com [172.26.132.145]) by ram.rentec.com (8.13.1/8.12.1) with ESMTP id k4CHhi7F019852; Fri, 12 May 2006 13:43:44 -0400 (EDT) Message-ID: <4464C950.40906@rentec.com> Date: Fri, 12 May 2006 13:43:44 -0400 From: Alan Stange Reply-To: stange@rentec.com Organization: Renaissance Technologies Corp. User-Agent: Mail/News 1.5.0.2 (X11/20060427) MIME-Version: 1.0 To: Tom Lane CC: Bruce Momjian , pgsql-ports@postgresql.org Subject: Re: solaris build problem with Sun compilers References: <200605112316.k4BNGeB17324@candle.pha.pa.us> <4463D639.3030802@rentec.com> <4464B653.1040301@rentec.com> <5470.1147451501@sss.pgh.pa.us> In-Reply-To: <5470.1147451501@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Logged: Logged by centaur.rentec.com as k4CHhkQw025485 at Fri May 12 13:43:46 2006 X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/28 X-Sequence-Number: 2409 Tom Lane wrote: > Alan Stange writes: >> I took a look at backend/port/tas/solaris_sparc.s file. Isn't that code >> a bit longer than needed? > > It's already been rewritten in HEAD; uses "cas" now. 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? 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? Yes, I know this is a somewhat crazy question, I'm just trying to get a sense of how "hot" this code path is. Thanks! -- Alan