Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3788187yba; Tue, 23 Apr 2019 09:36:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8ewGNTUzWtvsy397bL7sXlW8bKt5/tbfIp2XuY9hBa7TxV4s3536+Ij5CO8uSP82yXvF1 X-Received: by 2002:a17:902:54c:: with SMTP id 70mr27449034plf.210.1556037383891; Tue, 23 Apr 2019 09:36:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556037383; cv=none; d=google.com; s=arc-20160816; b=GzWr+1d3jmsi+6ijiur0OXJmD2vy/EMsZdT4IGixNKxkOzFoA1qKE0uVpKngeDgXzA S8os7rO4BAtEoPnb6t3cnHnqVFMeu3YifvyRgLDpXtDVJE9PGhcEo8kGIHFYKcg6dwr0 OKEFabaOJ5NH9ft8TLuy/mI39TZk6zXktUcJIDsSE5MNdZoctkAGGjgNH7q7WEfnP2bf YR/L4jc7YdDRjYCSrdbLA2dDOVLvoIoHY8gVlYrBQZap7Ltq+lk1VMBReHrw/udm9kMb 3mA2YszzeKy21nn+o/kkObAPpzEWmrI0f47ARaTPDd+vSE0trt5XBe+OfXLrI8d1NiDq 5nPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0U3DN21jJSHjryo32FyL3BVOe7dtJ75E6Tjlu2mOfww=; b=W/UXJgSjV2if7Ohxvdw696hZgxRlp5NxLM7PA16dWN+JiA1PHrIE0Zos/nfZFiSe7v h6gySF+iy9XLgjum9a4IFABX5IFtjNBQf0ojF892lgMPZ/YfeKSpM103NlBuLRd05u9N O3jMN1MOMfcDjEAZ2JzKOBPq01pYrU34PcGWy8se19+r9vLrUg0i0G0uLJ9bT4aSv1W3 AX4cunGeA2Qch6IGlEfHYNqLCuZaf86Kebl7xwH+E5TgNsPFh77ff/oZMqnqBrBf2h+w wsMQZODTBFqjiFD9DNuggUhN5GVizYLQp+K2g1wJjbGo3eOFQLdh5/DLL1A54f2EKgB0 pi6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iQaMBRju; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s9si15842095pgr.443.2019.04.23.09.36.08; Tue, 23 Apr 2019 09:36:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iQaMBRju; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728955AbfDWQdr (ORCPT + 99 others); Tue, 23 Apr 2019 12:33:47 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:35152 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728569AbfDWQdr (ORCPT ); Tue, 23 Apr 2019 12:33:47 -0400 Received: by mail-pg1-f194.google.com with SMTP id g8so7886382pgf.2; Tue, 23 Apr 2019 09:33:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0U3DN21jJSHjryo32FyL3BVOe7dtJ75E6Tjlu2mOfww=; b=iQaMBRjuoKwYKB7O2GsDX98OMllJ/uv/lzINdi4sfNeSK2VBMZHiOyHCoZ7dka43/T 6p0c0SiktgAOQ6AId8R6Moz951B66HuOUD29ySd7UTUxJvdT54QMkC3IJrX5MZjP/mSn bMsy3D909A2lwtdUwDub3UAjp9vroHIWEsKTt+spOnSdtPFL+I6QzGcg2lbT2uMXbwar xwky+jESzwTQSpVQ0acFeppNVmGelWlOa5AqcvbwELCdGVs0RjmnbhTWH6bCEBpNRCk3 f9GV3Cm4QlnjOW0nHj+u+xfOEL8/RAmyhQG62Nan+/Ak7xyLtRmOSQfdqAi1wwB2mQm3 1HHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0U3DN21jJSHjryo32FyL3BVOe7dtJ75E6Tjlu2mOfww=; b=l3gwd7viVWHcJ5FE1yuJQomFS087fjE8Lv4M7IOLgAIlswuqUJyTitC88fteSVBhUz LXKBcv2UiPTA5QjDQHLBdjBdYEuB1uK4g59RzOEo26vewDUZIRT4jJnnXaZDvTePjXLi o+3CPv8z/bvVQ2BaPBRWyDVex/EEd9WMgIU/d7CsCkOsV51b4uiTIaMLbaq6Ow2ECGkD 0x9s9gmNl/UFjPvkg8r/GvCUFE1f3yQSvs9uNfwczGzx6l46sL6KnOQJQMP2CD5JNWYA 1uOvn51IxTgXNqwq2SyygIjH7AKgvH2X76sjbYdFH+k0CljqNUc0GqOjbntZLjfVJr0e YY9Q== X-Gm-Message-State: APjAAAWQZxsnFMlGc2m1IMng4alRD7U/VRxE9iXPDU+b5MF+F4hvmLL4 uVEYRpIlkUgXVVpWrbqWmDY6g0lf X-Received: by 2002:a63:330e:: with SMTP id z14mr25388758pgz.4.1556037226258; Tue, 23 Apr 2019 09:33:46 -0700 (PDT) Received: from localhost.localdomain ([104.238.181.70]) by smtp.gmail.com with ESMTPSA id v1sm24364801pff.81.2019.04.23.09.33.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Apr 2019 09:33:44 -0700 (PDT) From: Changbin Du To: Jonathan Corbet Cc: Bjorn Helgaas , rjw@rjwysocki.net, linux-pci@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, x86@kernel.org, fenghua.yu@intel.com, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-gpio@vger.kernel.org, mchehab+samsung@kernel.org, Changbin Du Subject: [PATCH v4 21/63] Documentation: ACPI: move cppc_sysfs.txt to admin-guide/acpi and convert to reST Date: Wed, 24 Apr 2019 00:28:50 +0800 Message-Id: <20190423162932.21428-22-changbin.du@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190423162932.21428-1-changbin.du@gmail.com> References: <20190423162932.21428-1-changbin.du@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This converts the plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du --- .../acpi/cppc_sysfs.rst} | 71 ++++++++++--------- Documentation/admin-guide/acpi/index.rst | 1 + 2 files changed, 40 insertions(+), 32 deletions(-) rename Documentation/{acpi/cppc_sysfs.txt => admin-guide/acpi/cppc_sysfs.rst} (51%) diff --git a/Documentation/acpi/cppc_sysfs.txt b/Documentation/admin-guide/acpi/cppc_sysfs.rst similarity index 51% rename from Documentation/acpi/cppc_sysfs.txt rename to Documentation/admin-guide/acpi/cppc_sysfs.rst index f20fb445135d..a4b99afbe331 100644 --- a/Documentation/acpi/cppc_sysfs.txt +++ b/Documentation/admin-guide/acpi/cppc_sysfs.rst @@ -1,5 +1,11 @@ +.. SPDX-License-Identifier: GPL-2.0 - Collaborative Processor Performance Control (CPPC) +================================================== +Collaborative Processor Performance Control (CPPC) +================================================== + +CPPC +==== CPPC defined in the ACPI spec describes a mechanism for the OS to manage the performance of a logical processor on a contigious and abstract performance @@ -10,31 +16,28 @@ For more details on CPPC please refer to the ACPI specification at: http://uefi.org/specifications -Some of the CPPC registers are exposed via sysfs under: - -/sys/devices/system/cpu/cpuX/acpi_cppc/ - -for each cpu X +Some of the CPPC registers are exposed via sysfs under:: --------------------------------------------------------------------------------- + /sys/devices/system/cpu/cpuX/acpi_cppc/ -$ ls -lR /sys/devices/system/cpu/cpu0/acpi_cppc/ -/sys/devices/system/cpu/cpu0/acpi_cppc/: -total 0 --r--r--r-- 1 root root 65536 Mar 5 19:38 feedback_ctrs --r--r--r-- 1 root root 65536 Mar 5 19:38 highest_perf --r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_freq --r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_nonlinear_perf --r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_perf --r--r--r-- 1 root root 65536 Mar 5 19:38 nominal_freq --r--r--r-- 1 root root 65536 Mar 5 19:38 nominal_perf --r--r--r-- 1 root root 65536 Mar 5 19:38 reference_perf --r--r--r-- 1 root root 65536 Mar 5 19:38 wraparound_time +for each cpu X:: --------------------------------------------------------------------------------- + $ ls -lR /sys/devices/system/cpu/cpu0/acpi_cppc/ + /sys/devices/system/cpu/cpu0/acpi_cppc/: + total 0 + -r--r--r-- 1 root root 65536 Mar 5 19:38 feedback_ctrs + -r--r--r-- 1 root root 65536 Mar 5 19:38 highest_perf + -r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_freq + -r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_nonlinear_perf + -r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_perf + -r--r--r-- 1 root root 65536 Mar 5 19:38 nominal_freq + -r--r--r-- 1 root root 65536 Mar 5 19:38 nominal_perf + -r--r--r-- 1 root root 65536 Mar 5 19:38 reference_perf + -r--r--r-- 1 root root 65536 Mar 5 19:38 wraparound_time * highest_perf : Highest performance of this processor (abstract scale). -* nominal_perf : Highest sustained performance of this processor (abstract scale). +* nominal_perf : Highest sustained performance of this processor + (abstract scale). * lowest_nonlinear_perf : Lowest performance of this processor with nonlinear power savings (abstract scale). * lowest_perf : Lowest performance of this processor (abstract scale). @@ -48,22 +51,26 @@ total 0 * feedback_ctrs : Includes both Reference and delivered performance counter. Reference counter ticks up proportional to processor's reference performance. Delivered counter ticks up proportional to processor's delivered performance. -* wraparound_time: Minimum time for the feedback counters to wraparound (seconds). +* wraparound_time: Minimum time for the feedback counters to wraparound + (seconds). * reference_perf : Performance level at which reference performance counter accumulates (abstract scale). --------------------------------------------------------------------------------- - Computing Average Delivered Performance +Computing Average Delivered Performance +======================================= + +Below describes the steps to compute the average performance delivered by +taking two different snapshots of feedback counters at time T1 and T2. + + T1: Read feedback_ctrs as fbc_t1 + Wait or run some workload -Below describes the steps to compute the average performance delivered by taking -two different snapshots of feedback counters at time T1 and T2. + T2: Read feedback_ctrs as fbc_t2 -T1: Read feedback_ctrs as fbc_t1 - Wait or run some workload -T2: Read feedback_ctrs as fbc_t2 +:: -delivered_counter_delta = fbc_t2[del] - fbc_t1[del] -reference_counter_delta = fbc_t2[ref] - fbc_t1[ref] + delivered_counter_delta = fbc_t2[del] - fbc_t1[del] + reference_counter_delta = fbc_t2[ref] - fbc_t1[ref] -delivered_perf = (refernce_perf x delivered_counter_delta) / reference_counter_delta + delivered_perf = (refernce_perf x delivered_counter_delta) / reference_counter_delta diff --git a/Documentation/admin-guide/acpi/index.rst b/Documentation/admin-guide/acpi/index.rst index d68e9914c5ff..9049a7b9f065 100644 --- a/Documentation/admin-guide/acpi/index.rst +++ b/Documentation/admin-guide/acpi/index.rst @@ -10,3 +10,4 @@ the Linux ACPI support. initrd_table_override dsdt-override + cppc_sysfs -- 2.20.1