From owner-freebsd-acpi@FreeBSD.ORG Sat Jun 19 02:28:07 2004 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0BB7C16A4CE for ; Sat, 19 Jun 2004 02:28:07 +0000 (GMT) Received: from root.org (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id D46A443D49 for ; Sat, 19 Jun 2004 02:28:06 +0000 (GMT) (envelope-from nate@root.org) Received: (qmail 52433 invoked by uid 1000); 19 Jun 2004 02:27:57 -0000 Date: Fri, 18 Jun 2004 19:27:57 -0700 (PDT) From: Nate Lawson To: YONETANI Tomokazu In-Reply-To: <20040618052615.GA48947@les.ath.cx> Message-ID: <20040618192739.W52398@root.org> References: <20040616131055.GA37637@les.ath.cx> <20040618052615.GA48947@les.ath.cx> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-acpi@freebsd.org Subject: Re: cx_usage X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jun 2004 02:28:07 -0000 On Fri, 18 Jun 2004, YONETANI Tomokazu wrote: > On Wed, Jun 16, 2004 at 10:10:55PM +0900, YONETANI Tomokazu wrote: > > What do you think about the following changes? > > > > - print 100% instead of 99% when there's only 1 Cx state, and 0% > > when the sum is zero. > > - two digits from fractional part of each percentage are shown; > > my Laptop PC barely enters into C3 state and hw.acpi.cpu.cx_usage > > is almost always "0% 99% 0%" after revision 1.39. it's now shown as > > "0.00% 99.96% 0.03%" > > Actually, cpu_cx_stats[i] * 100 may not fit in u_int and would print > incorrect value as values grow. Please try this instead. Thank you. I committed this with minor changes. -Nate