From owner-freebsd-current Fri Dec 21 7:45:33 2001 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 0F60737B491; Fri, 21 Dec 2001 07:45:19 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id CAA11904; Sat, 22 Dec 2001 02:45:12 +1100 Date: Sat, 22 Dec 2001 02:45:14 +1100 (EST) From: Bruce Evans X-X-Sender: To: Luigi Rizzo Cc: John Baldwin , Peter Wemm , Subject: Re: vm_zeropage priority problems. In-Reply-To: <20011221055117.A15321@iguana.aciri.org> Message-ID: <20011222023741.P5064-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 21 Dec 2001, Luigi Rizzo wrote: > On Sat, Dec 22, 2001 at 12:46:40AM +1100, Bruce Evans wrote: > > I think pri_native is just an implementation detail which shouldn't > > be used or visible to threads. It used used by the priority propagation > > mechanism to hold the original pri_level. Threads should just use their > > original priority (or a different one if they want to temporarily change > > thier priority). Even pri_level probably shouldn't be used or visible > > to threads. > > the original priority should be somewhere and accessible, > either directly or through some function. Otherwise how > do we know what to pass to tsleep() ? It's whatever the thread set itself. There is no good way of setting this either (vm_pagezero() and poll_idle() hack it into td->td_ksegrp->kg_pri). Userland would use rtprio(2) instead. Unfortunately, this gives priorities in different units than the ones for tsleep(). > In any case I wonder if this is a bug new in -current; -stable > uses three separate data structures for realtime, user and idle tasks > so even specifying the wrong priority in tsleep should not cause > crossing classes there. -current has only one array, hence the > chance of doing the wrong thing. The 3 classes are a design bug in -stable. Crossing classes is sometimes right and 3 classes mainly make it harder and force triplication of code. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message