From owner-freebsd-arch@FreeBSD.ORG Wed Jan 25 11:02:49 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 83C4316A41F; Wed, 25 Jan 2006 11:02:49 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.FreeBSD.org (Postfix) with ESMTP id 694FC43DB8; Wed, 25 Jan 2006 10:58:39 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id 3B3F2BC74; Wed, 25 Jan 2006 10:58:08 +0000 (UTC) To: Alexander Leidinger From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 25 Jan 2006 11:45:44 +0100." <20060125114544.edawx42obkkos0ck@netchild.homeip.net> Date: Wed, 25 Jan 2006 11:58:07 +0100 Message-ID: <29245.1138186687@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: arch@freebsd.org, current@freebsd.org Subject: Re: [TEST/REVIEW] CPU accounting patches X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jan 2006 11:02:49 -0000 In message <20060125114544.edawx42obkkos0ck@netchild.homeip.net>, Alexander Lei dinger writes: >> That way, the user/system time reported will get units of "cpu seconds >> if the cpu ran full speed". > >How large do you expect the error will be? I don't consider it an error, I consider it increasing precision. If you run time mycommand on your laptop, and along the way the CPU clock ramps up from 75 MHz to 600 MHz before it reports user 2.01 sys 0.30 real 4.00 What exactly have you learned from the first two numbers with the current definition of "cpu second" ? With my definition you would be more likely to see lower numbers maybe user 0.20 sys 0.03 real 4.00 And they would have meaning, they should be pretty much the same no matter what speed your CPU runs at any instant in time. In theory, it should be possible to compare user/sys numbers you collect while running at 75 MHz with the ones you got under full steam at 1600 MHz. In practice however, things that run on the real time, HZ interrupting to run hardclock() for instance, will still make comparison of such numbers quite shaky. But at least they will not be random as they are now. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.