From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id F2037DDEF0 for ; Thu, 25 Oct 2007 07:56:21 +1000 (EST) Subject: Re: New time code miscalculates cpu usage From: Benjamin Herrenschmidt To: Sergei Shtylyov In-Reply-To: <471FA875.6080602@ru.mvista.com> References: <20071016202525.GA11837@lixom.net> <471FA875.6080602@ru.mvista.com> Content-Type: text/plain Date: Thu, 25 Oct 2007 07:56:09 +1000 Message-Id: <1193262969.6653.32.camel@pasglop> Mime-Version: 1.0 Cc: Olof Johansson , linuxppc-dev@ozlabs.org, paulus@samba.org Reply-To: benh@kernel.crashing.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, 2007-10-25 at 00:17 +0400, Sergei Shtylyov wrote: > Hello. > > Olof Johansson wrote: > > > Not sure when this started happening, but I wanted to report it. I'll > > start bisecting in a day or two if noone else has gotten around to > > looking at it: > > > $ echo "int main(void) { while(1); }" > test.c ; gcc test.c > > $ time ./a.out & sleep 2 ; killall a.out > > real 0m2.008s > > user 0m4.014s > > sys 0m0.002s > > > > Seen on POWER5 and PA6T, haven't tried anything else yet. > > I'm not surprised -- the kernel accounts twice for each tick. Your input would be much more valuable if you actually pointed out where that happens and why since you seem to know it. Ben.