From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 6 09:11:27 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 808F81065676; Sat, 6 Aug 2011 09:11:27 +0000 (UTC) Date: Sat, 6 Aug 2011 09:11:27 +0000 From: Alexander Best To: Yuri Message-ID: <20110806091127.GA39951@freebsd.org> References: <4E3CC033.6070604@rawbw.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E3CC033.6070604@rawbw.com> Cc: freebsd-hackers@freebsd.org Subject: Re: top(1) loses process user time count when threads end X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2011 09:11:27 -0000 On Fri Aug 5 11, Yuri wrote: > I have the process that first runs in 3 threads but later two active > threads exit. > > top(1) shows this moment this way (1 sec intervals): > 30833 yuri 3 76 0 4729M 4225M nanslp 4 0:32 88.62% app > 30833 yuri 3 76 0 4729M 4225M nanslp 6 0:34 90.92% app > 30833 yuri 1 96 0 4729M 4225M CPU1 1 0:03 1.17% app > 30833 yuri 1 98 0 4729M 4226M CPU1 1 0:04 12.89% app > > Process time goes down: 0:34 -> 0:03. Also WCPU goes down 90.92% -> > 1.17% even though this process is CPU bound and does intense things > right after threads exit. > > getrusage(2) though, called in the process, shows the correct user time. > > I think this is the major bug in the process time accounting. could you check, whether kern/128177 or kern/140892 describe your situation? cheers. alex > > 8.2-STABLE > > Yuri