From owner-freebsd-acpi@FreeBSD.ORG Thu Feb 14 21:19:55 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C89F116A417 for ; Thu, 14 Feb 2008 21:19:55 +0000 (UTC) (envelope-from SRS0=64846b4c128b0f37d673e0745847ff6e03dd0c63=611=es.net=oberman@es.net) Received: from postal1.es.net (postoffice1.tagpma.org [IPv6:2001:400:14:3::6]) by mx1.freebsd.org (Postfix) with ESMTP id 2324A13C44B for ; Thu, 14 Feb 2008 21:19:55 +0000 (UTC) (envelope-from SRS0=64846b4c128b0f37d673e0745847ff6e03dd0c63=611=es.net=oberman@es.net) Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by postal1.es.net (Postal Node 1) with ESMTP (SSL) id UXH06953; Thu, 14 Feb 2008 13:19:53 -0800 Received: from ptavv.es.net (ptavv.es.net [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id A392B4500F; Thu, 14 Feb 2008 13:19:52 -0800 (PST) To: Andriy Gapon In-Reply-To: Your message of "Thu, 14 Feb 2008 22:13:38 +0200." <47B4A0F2.2080404@icyb.net.ua> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1203023992_1097P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Thu, 14 Feb 2008 13:19:52 -0800 From: "Kevin Oberman" Message-Id: <20080214211952.A392B4500F@ptavv.es.net> X-Sender-IP: 198.128.4.29 X-Sender-Domain: es.net X-Recipent: ;;; X-Sender: X-To_Name: Andriy Gapon X-To_Domain: icyb.net.ua X-To: Andriy Gapon X-To_Email: avg@icyb.net.ua X-To_Alias: avg Cc: freebsd-acpi@freebsd.org Subject: Re: cx_lowest and CPU usage X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2008 21:19:56 -0000 --==_Exmh_1203023992_1097P Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > Date: Thu, 14 Feb 2008 22:13:38 +0200 > From: Andriy Gapon > > on 14/02/2008 22:05 Kevin Oberman said the following: > >> From: Bengt Ahlgren > >> Date: Thu, 14 Feb 2008 18:14:33 +0100 > >> Sender: owner-freebsd-acpi@freebsd.org > >> > >> Andriy Gapon writes: > >> > >>> on 11/02/2008 23:41 Andriy Gapon said the following: > >>>> on 01/02/2008 17:37 Andriy Gapon said the following: > >>>>>> Andriy Gapon wrote: > >>>>>>> Report for 7.0-RC1 on quite old hardware: 440BX-based motherboard, > >>>>>>> 450Mhz Pentium III (Katmai). > >>> [snip] > >>>>>>> There is a weird thing: if I change cx_lowest to C2 when the machine is > >>>>>>> completely idle, top shows that CPU usage for interrupts immediately > >>>>>>> jumps to almost 20%. Change cx_lowest to C1, CPU usage drops back to > >>>>>>> almost 0%. > >>>>>>> Is this normal ? > >>> [snip] > >>> > >>> I mis-reported the issue. Actually the above behavior occurs if I > >>> throttle CPU 50% (via acpi throttling) and I am not concerned about this > >>> at all. > >>> > >>> C2 has even stranger effects. > >>> On almost idle system, with cx_lowest=C1, top reports about 0-2% user, > >>> 0% nice, 0-2% system, 1-2% interrupt, 94-98% idle. > >>> After changing cx_lowest to C2, I see the following: 0-2% user, 0% nice, > >>> 0-2% system, 94-98% interrupt, 1-2% idle. > >> I see a similar effect on my TP with Pentium-M when it is in C3 or C4, > >> but it's more in the order of 4% when in C3 and some 10-15% in C4. I > >> think that the additional time accounted to interrupts is due to the > >> time it takes to wake the CPU up from the particular Cx-state. My C3 > >> takes 85 (us?? or cycles???): > >> > >> [root@P142 ~]# sysctl dev.cpu.0.cx_supported > >> dev.cpu.0.cx_supported: C1/1 C2/1 C3/85 > >> > >> [...] > >> > >>> Just in case, here's a little bit of sysctl output: > >>> dev.cpu.0.freq: 448 > >>> dev.cpu.0.freq_levels: 448/-1 224/-1 > >>> dev.cpu.0.cx_supported: C1/0 C2/90 > >>> dev.cpu.0.cx_lowest: C2 > >>> dev.cpu.0.cx_usage: 1.71% 98.28% > >> With this slow CPU, a wakeup time of 90 from C2 could very well result > >> in this much interupt time. It just barely manages to wake up, > >> execute the clock interrupt and go to sleep again before the next > >> clock interrupt. What if you reduce HZ? > > > > Possible dumb question. Do you (either of you) have USB drivers in your > > kernel or loaded? > > Yes. > > > This is just a shot in the dark, but I have seen weird things when I > > have USB drivers loaded and usually don't load them on my laptop > > until/unless I need them. At very least, USB kills the battery on my > > T43 a LOT faster. > > In my case this is a quite old desktop system. I've heard about the > issue and saw comments in the code. I think that USB affects C3 state, > mostly by preventing it from being really used while incurring some > extra overhead. It certainly blocks ever reaching C3 because of the continual activity it generates, but I can see that it might also increase the interrupt time while in C2. That said, I just did some testing on my laptop in C2 and, while I see a small increase in interrupt load, it is not anywhere near what is being reported in this thread. I did say it might be dumb. At least that part was right. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751 --==_Exmh_1203023992_1097P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) Comment: Exmh version 2.5 06/03/2002 iD8DBQFHtLB4kn3rs5h7N1ERAg5sAJ9pBLUXk3BSMCUjcjZ+g7acG9t7HQCgsnho /Xht9UDJ7sdYIvAe1GzYWeQ= =+crB -----END PGP SIGNATURE----- --==_Exmh_1203023992_1097P--