From owner-freebsd-threads@FreeBSD.ORG Fri Feb 18 16:10:01 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 8917E16A4CE for ; Fri, 18 Feb 2005 16:10:01 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1152043D41 for ; Fri, 18 Feb 2005 16:10:01 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) j1IG9u7G022727; Fri, 18 Feb 2005 11:09:57 -0500 (EST) Date: Fri, 18 Feb 2005 11:09:56 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Kazuaki Oda In-Reply-To: <4214C4D5.2080100@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 16:10:01 -0000 On Fri, 18 Feb 2005, Kazuaki Oda wrote: > Hi, > > thr_accounting function (libpthread/thread/thr_kern.c) calculates > thread->slice_usec, and it uses tm_uticks, tm_sticks and _clock_res_usec. > I think that kernel counts up tm_uticks and tm_sticks at statclock interrupt > time, and on -CURRENT _clock_res_usec is 1000 and on 5-STABLE it is 10000. > > Does thr_accounting calculate thread->slice_usec correctly? I just fixed this. It didn't really affect anything, though, since it's all relative. You could have used any bogus number for the resolution of a tick. -- DE