From owner-freebsd-current Mon Oct 16 19:39:51 2000 Delivered-To: freebsd-current@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 2407237B4F9 for ; Mon, 16 Oct 2000 19:39:49 -0700 (PDT) Received: from vigrid.com (pm3-pt17.pcnet.net [206.105.29.91]) by pcnet1.pcnet.com (8.8.7/PCNet) with ESMTP id WAA10837; Mon, 16 Oct 2000 22:39:30 -0400 (EDT) Message-ID: <39EBBA88.684E3178@vigrid.com> Date: Mon, 16 Oct 2000 22:33:44 -0400 From: "Daniel M. Eischen" X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: current@freebsd.org Subject: Re: Recent thread changes References: <200010170201.e9H21GF53460@vashon.polstra.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG jdp@polstra.com wrote: > > In article > , Daniel > Eischen wrote: > > > For SCHED_FIFO and SCHED_RR, we don't have a problem because both > > the threads library and kernel now agree that the range is 0..31. > > SCHED_OTHER is a problem because the threads library treats > > SCHED_OTHER as SCHED_RR with range 0..31. The kernel treats > > SCHED_OTHER traditionally with range -20..20. > > As long as the only problem area is SCHED_OTHER, we are arguably > OK. SCHED_OTHER is almost entirely implementation-defined; it can > do practically anything. More specifically, section 13.5.2.2 (the > detailed description of pthread_[sg]etschedparam) says: > > The policy parameter may have the value SCHED_OTHER, SCHED_FIFO, > or SCHED_RR. The scheduling parameters for the SCHED_OTHER policy > are implementation defined. The SCHED_FIFO and SCHED_RR policies > shall have a single scheduling parameter sched_priority. > > I think it would be slightly less surprising if our implementation of > SCHED_OTHER used thread priorities in the range -20..20 just the same > as processes. But in my opinion POSIX doesn't require that. I tend to agree. When you consider that you can mix PTHREAD_SCOPE_SYSTEM threads with PTHREAD_SCOPE_PROCESS threads, it seems logical that you'd want the priority ranges in both the threads library and the kernel to agree. I would just rather see 0..31 instead of -20..20. We'll have to address this issue in the near future. -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message