From owner-svn-src-head@FreeBSD.ORG Mon Jul 2 17:11:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AF3F21065674; Mon, 2 Jul 2012 17:11:14 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id A3A178FC08; Mon, 2 Jul 2012 17:11:13 +0000 (UTC) Received: by bkcje9 with SMTP id je9so406135bkc.13 for ; Mon, 02 Jul 2012 10:11:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Y7X8KJF+fT+LtsiPPXjoeoQ+G78gcdeKBMLxvBTGJKM=; b=TJE+bVXdIetGedVs0hUlC3rY6l3rPKENdnL5pnB4TD6wuRSzR/IC6YEd0tthS+ThYp CtCrVfjehP+LkvuqJWCFRm8WUDa0zzBhnXf36VDpT1SztO1ioJ0O5qLO8EGj129pniXp y/VOXR5KVtAfqia/vPu2U2TKRL4zETKsPjW85Wev9VEWJx7k9VJoBZj0MShlwVR0BcPQ Q8HaJdgiTeAP2PrCPvhOPu2t0Y5Xq61cQNznYke0maPcZhoeJMpZM2WgD+zo82AhzaJ0 +73EJLWpoSFLQz3J0D3tvKwgA+ulHS7HTebHNXjf3yRQ5N9BsHk5N0Aw6ifHqL+Wf6A/ QAhQ== Received: by 10.204.152.13 with SMTP id e13mr8118889bkw.46.1341249072425; Mon, 02 Jul 2012 10:11:12 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id e20sm14357984bkv.10.2012.07.02.10.11.10 (version=SSLv3 cipher=OTHER); Mon, 02 Jul 2012 10:11:11 -0700 (PDT) Sender: Alexander Motin Message-ID: <4FF1D62C.2090705@FreeBSD.org> Date: Mon, 02 Jul 2012 20:11:08 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120621 Thunderbird/13.0.1 MIME-Version: 1.0 To: Sean Bruno References: <201207021657.q62GvD7j082717@svn.freebsd.org> In-Reply-To: <201207021657.q62GvD7j082717@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238004 - in head: etc/rc.d sys/dev/acpica X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 17:11:14 -0000 On 07/02/12 19:57, Sean Bruno wrote: > Author: sbruno > Date: Mon Jul 2 16:57:13 2012 > New Revision: 238004 > URL: http://svn.freebsd.org/changeset/base/238004 > > Log: > Cosmetic display change of Cx states via cx_supported sysctl entries. > > Adjust power_profile script to handle the new world order as well. > > Some vendors are opting out of a C2 state and only defining C1 & C3. This > leads the acpi_cpu display to indicate that the machine supports C1 & C2 > which is caused by the (mis)use of the index of the cx_state array as the > ACPI_STATE_CX value. > > e.g. the code was pretending that cx_state[i] would > always convert to i by subtracting 1. > > cx_state[2] == ACPI_STATE_C3 > cx_state[1] == ACPI_STATE_C2 > cx_state[0] == ACPI_STATE_C1 > > however, on certain machines this would lead to > cx_state[1] == ACPI_STATE_C3 > cx_state[0] == ACPI_STATE_C1 > > This didn't break anything but led to a display of: > * dev.cpu.0.cx_supported: C1/1 C2/96 > > Instead of > * dev.cpu.0.cx_supported: C1/1 C3/96 > > MFC after: 2 weeks If I remember correctly, ACPI spec directly specifies that there can be several C-states with the same type but with different enter method and exit latency. I have never seen any system with more then 3 C-states yet, but technically I think that is possible. Type field defines enter/exit semantics, respecting cache coherency and other things, so I think there can be more then one state with, for example, C3 semantics. Latest CPUs support states C1, C3 and C5, while ACPI AFAIK defines only three types and it may happen that both C3 and C5 have type-3 semantics. -- Alexander Motin