From owner-freebsd-acpi@FreeBSD.ORG Thu Apr 10 07:18:01 2014 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFC0F23F for ; Thu, 10 Apr 2014 07:18:01 +0000 (UTC) Received: from mail-pd0-x22e.google.com (mail-pd0-x22e.google.com [IPv6:2607:f8b0:400e:c02::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A7571C62 for ; Thu, 10 Apr 2014 07:18:01 +0000 (UTC) Received: by mail-pd0-f174.google.com with SMTP id y13so3523877pdi.33 for ; Thu, 10 Apr 2014 00:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=dHW5LE5vBVC1MF3lLwYeRPeJYVZgOvdYL8WmtwfgdVc=; b=TD579+1Pe0JCauss44uccarQhGmn4hWcxjwQB2ILOPAZASHQsYiKMZyeKcyqhzGEDl ST4G9kQS1j2PNN5XDXTGA478314TNSJ3fuRKGkb2nsJVZyikwUubJ2vPE/LfwVs6bWaV 4SPAljO0Tb4HB1IgiXiCL99mlP8ew45GjV/oPky9IdCxqADHyNTesmUcysRn5Qu/ycR1 wSaKwLLHcPOtE9fOb8NfoPU8v4ItfaL7YFgHyzzrWHi8GaoiDdw236+sRGpQFJNuJO+J 4T42IwXf5CqyePtFwC/bk9ct43knyP+CENUmzeb+LIwKpOw8jj2kHOwFcEZEoDiVyic+ F85w== MIME-Version: 1.0 X-Received: by 10.67.1.106 with SMTP id bf10mr17586356pad.78.1397114281064; Thu, 10 Apr 2014 00:18:01 -0700 (PDT) Sender: kob6558@gmail.com Received: by 10.66.73.34 with HTTP; Thu, 10 Apr 2014 00:18:00 -0700 (PDT) In-Reply-To: References: Date: Thu, 10 Apr 2014 00:18:00 -0700 X-Google-Sender-Auth: OVy9TdutTUD6zdZS_93EvoCTFQo Message-ID: Subject: Re: C-States configuration From: Kevin Oberman To: hiren panchasara Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: "freebsd-acpi@freebsd.org" X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2014 07:18:01 -0000 On Wed, Apr 9, 2014 at 11:22 AM, hiren panchasara < hiren.panchasara@gmail.com> wrote: > On Wed, Apr 9, 2014 at 11:07 AM, Anton Sayetsky wrote: > > 2014-04-09 20:40 GMT+03:00 hiren panchasara >: > >> I am running -current on my T420 at r263906M > >> > >> debug.acpi.acpi_ca_version: 20130823 > >> > >> o/p of sysctl -a | grep acpi - http://bpaste.net/show/199806/ > >> > >> and I have following in my rc.conf: > >> > >> performance_cx_lowest="Cmax" > >> economy_cx_lowest="Cmax" > >> > >> But I still get: > >> > >> % sysctl -a | grep cx_lowest > >> hw.acpi.cpu.cx_lowest: C1 > >> dev.cpu.0.cx_lowest: C1 > >> dev.cpu.1.cx_lowest: C1 > >> dev.cpu.2.cx_lowest: C1 > >> dev.cpu.3.cx_lowest: C1 > >> > >> And I can do: > >> # sysctl dev.cpu.0.cx_lowest=Cmax > >> dev.cpu.0.cx_lowest: C1 -> C8 > >> > >> that tells me that Cmax is C8. > >> > >> % sysctl -d dev.cpu.0.cx_lowest > >> dev.cpu.0.cx_lowest: lowest Cx sleep state to use > >> > >> I was expecting cx_lowest to be set to C8 because of rc.conf config I > have. > >> > >> What am I missing here? > >> > >> cheers, > >> Hiren > > Try to set LOW instead of Cmax. > > I will try it again. > > Interestingly enough, on an amd machine, it worked as I expected with > a bit more current version of -head but same version of acpica: > debug.acpi.acpi_ca_version: 20130823 > > cpus came up with cx_lowest set to C8 with Cmax in rc.conf > > cheers, > Hiren > Setting Cx values is a bit confusing. Things may not mean what you think. CMax is always C8 because this is the largest possible value of a Cx state, not because C8 is actually available.The reason for this is that some systems have non-sequencial Cx states. That is the maximum value my be C5, but C2 may not be available. So the idea is to allow ANY C-state up to the maximum. LOWEST works well as long as no states are skipped. If they are, you are limited to the states before the skipped state. To see the actual available states, look at dev.cpu.0.cx_supported. The recommended value for best power savings is :Cmax. That will allow skipping over missing C-states. Also, the available states often differ between AC power and battery. On my T320: AC dev.cpu.0.cx_supported: C1/1/1 C2/3/104 Battery dev.cpu.0.cx_supported: C1/1/1 C2/2/80 C3/3/109 I am unsure why you are only seeing C1. -- R. Kevin Oberman, Network Engineer, Retired E-mail: rkoberman@gmail.com