From owner-freebsd-java@FreeBSD.ORG Tue Sep 18 18:01:04 2007 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC0F316A41A; Tue, 18 Sep 2007 18:01:04 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 8B95413C4D5; Tue, 18 Sep 2007 18:01:04 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.1/8.14.1/NETPLEX) with ESMTP id l8II13ji007686; Tue, 18 Sep 2007 14:01:03 -0400 (EDT) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-3.0 (mail.netplex.net [204.213.176.10]); Tue, 18 Sep 2007 14:01:03 -0400 (EDT) Date: Tue, 18 Sep 2007 14:01:03 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Kurt Miller In-Reply-To: <46F00ACF.1080700@intricatesoftware.com> Message-ID: References: <46EC1B55.4060202@FreeBSD.org> <46EDDCC9.90403@intricatesoftware.com> <200709180721.48995.kurt@intricatesoftware.com> <46EFDDA8.2030603@intricatesoftware.com> <46F00ACF.1080700@intricatesoftware.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Kip Macy , Kris Kennaway , performance@freebsd.org, freebsd-java@freebsd.org Subject: Re: Massive performance loss from OS::sleep hack X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2007 18:01:04 -0000 On Tue, 18 Sep 2007, Kurt Miller wrote: > Daniel Eischen wrote: >> >> I would just totally ignore setting thread priorities >> unless the UseThreadPriority knob is set. The kernel >> scheduler (for libthr) doesn't seem to care what a thread's >> priority is anyways unless it is in the real-time class. >> That way, all threads will be at the default priority >> by default ;-) > > I think that's a fine idea. Just changing the default to > be UseThreadPriority=false and completely remove the > os_sleep() bits. If Sun corrects the API or the TCK tests > the default can be changed back. Yes, and the Java spec (at least for Thread.yield()) is also saying that priorities are meaningless. They can't just say that Thread.yield() allows other threads to run without defining their behavior. How many threads can run? All? Is it acceptable for yield to allow only one thread to run, and for only one clock tick? What is the point of having priorities in Java if they can't be used reliably? But I digress... -- DE