From owner-freebsd-acpi@FreeBSD.ORG Thu Mar 26 14:51:17 2009 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 35B4E10656C8 for ; Thu, 26 Mar 2009 14:51:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 043588FC1B for ; Thu, 26 Mar 2009 14:51:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id 8DB9E46B43; Thu, 26 Mar 2009 10:51:16 -0400 (EDT) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n2QEowM7083075; Thu, 26 Mar 2009 10:51:10 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Bruce Cran Date: Thu, 26 Mar 2009 10:50:51 -0400 User-Agent: KMail/1.9.7 References: <200903200030.n2K0U3iG011009@freefall.freebsd.org> <200903260937.51028.jhb@freebsd.org> <20090326143731.0d2b7711@gluon.draftnet> In-Reply-To: <20090326143731.0d2b7711@gluon.draftnet> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903261050.51602.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Thu, 26 Mar 2009 10:51:10 -0400 (EDT) X-Virus-Scanned: ClamAV 0.94.2/9169/Thu Mar 26 00:13:48 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Daniel =?utf-8?q?Dvo=C5=99=C3=A1k?= , freebsd-acpi@freebsd.org Subject: Re: kern/108581: [sysctl] sysctl: hw.acpi.cpu.cx_lowest: Invalid argument 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, 26 Mar 2009 14:51:17 -0000 On Thursday 26 March 2009 10:37:31 am Bruce Cran wrote: > On Thu, 26 Mar 2009 09:37:50 -0400 > John Baldwin wrote: > > > No, the code is doing things differently on purpose (though I'm not > > completely sure why). For _CST it sets cpu_cx_count to the maximum > > Cx level supported by any CPU in the system. For non-_CST it sets it > > to the maximum Cx level supported by all CPUs in the system. I think > > it is correct for cpu_cx_count to always start at 0 and only be > > bumped up to a higher setting. Setting it to 3 would be very wrong > > for the _CST case as I've seen CPUs that support C4. > > From briefly reading through the specifications I'd assumed the maximum > power state was C3. For the non _CST case that is all that is defined, yes. However, _CST is a variable length array of Cx states, so it can support arbitrary numbers of states. > I had thought the _CST block was wrong because in > acpi_cpu_global_cx_lowest_sysctl it validates the new value against > cpu_cx_count; if one CPU has a lower cx state than the others, then > won't this tell the other CPUs to use an unsupported state? It depends on if the CPU driver is smart enough to cap requests to sc->cpu_cx_count, though if it does presumably it would do that in the cx_generic case as well. I'm not sure why it behaves differently for the _CST case, but I do think it is on purpose at least rather than an accidental bug. Perhaps Nate can chime in with why? -- John Baldwin