From owner-freebsd-threads@FreeBSD.ORG Fri Feb 18 18:57:26 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 0114116A4CE for ; Fri, 18 Feb 2005 18:57:26 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4AD9A43D3F for ; Fri, 18 Feb 2005 18:57:25 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) j1IIvNGa004608; Fri, 18 Feb 2005 13:57:24 -0500 (EST) Date: Fri, 18 Feb 2005 13:57:23 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Kazuaki Oda In-Reply-To: <42161DFE.70701@highway.ne.jp> 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 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: Fri, 18 Feb 2005 18:57:26 -0000 On Sat, 19 Feb 2005, Kazuaki Oda wrote: > > And while looking at thr_kern.c, I've had one more question. > In kse_switchout_thread, after calling thr_accounting thread is placed > at the tail of run queue or at the head of it according to > thread->slice_usec. > But in kse_check_completed, thread is just placed at the tail of run queue. > Is there any reason why thread is not placed at the head of run queue in > case of thread->slice_usec != -1? Because it already blocked and we don't want to needlessly switch out a currently running thread that hasn't used its quantum. -- DE