From owner-freebsd-performance@FreeBSD.ORG Tue Sep 18 19:17:18 2007 Return-Path: Delivered-To: performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AAF016A420; Tue, 18 Sep 2007 19:17:18 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx1.freebsd.org (Postfix) with ESMTP id D78F313C45B; Tue, 18 Sep 2007 19:17:15 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <46F0243A.8020902@FreeBSD.org> Date: Tue, 18 Sep 2007 21:17:14 +0200 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Kurt Miller References: <46EC1B55.4060202@FreeBSD.org> <46EDDCC9.90403@intricatesoftware.com> <200709180721.48995.kurt@intricatesoftware.com> In-Reply-To: <200709180721.48995.kurt@intricatesoftware.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Daniel Eischen , Kip Macy , performance@freebsd.org, freebsd-java@freebsd.org Subject: Re: Massive performance loss from OS::sleep hack X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2007 19:17:18 -0000 Kurt Miller wrote: > David Xu confirmed for me that pthread_yield() does give some > time to lower priority threads on 7.0 using thr. Attached and inline > are two patches for the 1.5 port that is how I suggest the issue be > addressed. > > For 7.0 and up default UseThreadPriorities to true and always > use pthread_yield(). For < 7.0 default UseThreadPriorities to > false and conditionally use pthread_yield()/os_sleep(). User's > can toggle UseThreadPriorities with the command line argument > -XX:+UseThreadPriorities Do we know that 6.x requires the old behaviour? Maybe it can default to on there too. Otherwise this looks good to my eyeball (but the DEFAULT_LD_LIBRARY_PATH change looks unrelated) -#define DEFAULT_LD_LIBRARY_PATH "/usr/lib" /* See ld.so.1(1) */ +#define DEFAULT_LD_LIBRARY_PATH "/usr/lib:/usr/local/lib" /* See ld.so.1(1) Kris