From owner-freebsd-threads@FreeBSD.ORG Mon Feb 21 06:04:44 2005 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D0EA516A4CE; Mon, 21 Feb 2005 06:04:44 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 544B343D48; Mon, 21 Feb 2005 06:04:44 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) j1L64g5P026584; Mon, 21 Feb 2005 01:04:42 -0500 (EST) Date: Mon, 21 Feb 2005 01:04:42 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Julian Elischer In-Reply-To: <42193303.2090500@elischer.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: threads@freebsd.org cc: David Xu Subject: Re: thread accounting in libpthread X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Feb 2005 06:04:45 -0000 On Sun, 20 Feb 2005, Julian Elischer wrote: > David Xu wrote: > > Daniel Eischen wrote: > > > >> ... > >> > >> since it will be the only thread in the queue. If N threads > >> complete (assuming they are all at the same priority) then > >> the first thread pulled from the completed list will be > >> run first since it will be the first thread added to the > >> run queue. > >> > >> > >> > > note that kernel adds completed thread in reversed order. > > I guess we could fix that easily with a tail pointer. I don't know that it matters much. With the work-around I posted, it made matters even worse for the test case. I'm not against you changing the ordering in the kenel if you think that is best. -- DE