Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Sep 2007 14:01:03 -0400 (EDT)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Kurt Miller <kurt@intricatesoftware.com>
Cc:        Kip Macy <kip.macy@gmail.com>, Kris Kennaway <kris@freebsd.org>, performance@freebsd.org, freebsd-java@freebsd.org
Subject:   Re: Massive performance loss from OS::sleep hack
Message-ID:  <Pine.GSO.4.64.0709181353420.16540@sea.ntplx.net>
In-Reply-To: <46F00ACF.1080700@intricatesoftware.com>
References:  <46EC1B55.4060202@FreeBSD.org> <b1fa29170709161256n25bdb7d8q8aa2f1b263c18e48@mail.gmail.com> <46EDDCC9.90403@intricatesoftware.com> <200709180721.48995.kurt@intricatesoftware.com> <Pine.GSO.4.64.0709180822080.15581@sea.ntplx.net> <46EFDDA8.2030603@intricatesoftware.com> <Pine.GSO.4.64.0709181301320.16540@sea.ntplx.net> <46F00ACF.1080700@intricatesoftware.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.0709181353420.16540>