Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1949194ybb; Sat, 21 Mar 2020 09:14:31 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuY6jH9h9a40S5RA30LNuxsOY+/If7OIIAvSO/Ps38Z3cBsfXWmPz7ZU/p1g2jIYFYAS2LM X-Received: by 2002:aca:cf48:: with SMTP id f69mr10359811oig.122.1584807271075; Sat, 21 Mar 2020 09:14:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584807271; cv=none; d=google.com; s=arc-20160816; b=s4fuBt8Krvscg425l9IaF7l5UxCdutRIVgZW54s61iWCdYxGUlju/E2g+GXjwi4Gle FTXo8rkr4XfRHS8QQ3cK0HSLm+iVfPEy11IfVKg9QFgfNLloFR8qplJWAEDY9zkA+Z04 QdSxFZCLsbWtss8SOTuvjc/wY7pE7M+u60NjYI4FL6ak25m3DTKgKPD4FRX6TS0O5pOl Tody41JYT+eGNrKRpr34zZCdHAQRs8YV+pbn9EkhpVsV9oI6rm4bTVBC+Ylu6C2SLMoC hZXWd2vBvcXWxqWCrGTuagc0mAxdvDDjrnFaxlt3x4gVU2hXwwYhczWFeLxhSscfoIk8 8ZVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=zjfqHm0ZTbjA1O22i1eTN10C6pr74+8t2h9HGWUzsps=; b=Qcd3AlJGurAPR6h/fgncex87l2JbRpEnTDeTRmKOl1ZF19FCv6K5CyP7k1yfvdIhMc ZsH+ayXoQWB4o9SF00h+1/RogZ0u5JPBp3RVDkz1pooMC5aOssdHQQpVYmKPSrUbUqCK fSkZlFVXqCldE12xA8G/0pcYxwY1XNbxz+WpLRcX4OLycLRFUZHtQigMua+pQRnKqy5d wPhEA0RKl3c8Fa+JKv3Tit2hoERz8S8R47GqkX90kX6y32hWDx1127mq26Gled1wd76E E79jVGtuRYWeikF2YpN5rC8xDRkrcsHbblFDO6yo2/w/4GWKdMQ053OBcgZLnRGAbC3k evng== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f82si3098127oia.58.2020.03.21.09.14.18; Sat, 21 Mar 2020 09:14:31 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727534AbgCUQNv (ORCPT + 99 others); Sat, 21 Mar 2020 12:13:51 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:34866 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727232AbgCUQNu (ORCPT ); Sat, 21 Mar 2020 12:13:50 -0400 Received: by mail-ed1-f68.google.com with SMTP id a20so10914749edj.2; Sat, 21 Mar 2020 09:13:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zjfqHm0ZTbjA1O22i1eTN10C6pr74+8t2h9HGWUzsps=; b=q+eQU/JSGtGnIanZm2xEotxC/67QJR70WeJ8ugDC4C+qocYTT0aB1JJJWENh3OtJRG JfnsyAowkl3wVDSfHFWWguUDre4H+lWF3VwZTPHbWOzAVUMeFend7qICSiIG8vBXcT1J tsySkqdSRkW7ej021xNt+evLChfhuXDZMQiGsTMe2+L7EeCRow/H6v/Pi9wuX2zvOd1L iLXwfQvBkb0UD1FVknsyxrcbzmAuvt/DNvK0fBHleYSEHuNahry7Z5r11INwILR3aTbC SmT7pmCiFmqJNN0m7eaWUUu9PfAbGZoWuF3UJ6VZsDD+YcC0/f70TrIvEFrJPNA4mPQ4 14Yw== X-Gm-Message-State: ANhLgQ0BEaImAtSyfTxPuSE21AuFmCc9aJ+BtQNj98b3uj/W6+Q6GxYz maipk0n01Mt1XrOOv6cHayQoUO1j9CZ8n08SwNOkM4Mu X-Received: by 2002:aa7:dbc1:: with SMTP id v1mr13429578edt.177.1584807228989; Sat, 21 Mar 2020 09:13:48 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Len Brown Date: Sat, 21 Mar 2020 12:13:37 -0400 Message-ID: Subject: Re: turbostat: Display all C-states on AMD Ryzen processor To: Paul Menzel Cc: Linux PM list , Linux Kernel Mailing List , X86 ML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, Thanks for the note. This devices is exposing two C-states to the OS, via ACPI tables: cpu7: C1: ACPI HLT cpu7: C2: ACPI IOPORT 0x414 And turbostat is showing the kernel's count of requests into those states, and %residency in those states. So far, this is similar to what would be seen on most Intel parts, except Intel usually expose a couple more states to the OS, often via a native intel_idle driver, rather than the ACPI BIOS. That part that is really missing from AMD is hardware residency counters. I don't know if there are any or not. If somebody knows of any that are publicly documented and is willing to test patches to show them to the user, I'd be happy to cut patches. cheers, -Len On Tue, Feb 11, 2020 at 6:18 AM Paul Menzel wrote: > > Dear Len, > > > Running `turbostat` on an AMD Ryzen 5 PRO 1500, I do not see all C-states. > > ``` > $ git describe > v5.6-rc1 > $ sudo ./turbostat > turbostat version 19.08.31 - Len Brown > CPUID(0): AuthenticAMD 0xd CPUID levels; 0x8000001f xlevels; family:model:stepping 0x17:1:1 (23:1:1) > CPUID(1): SSE3 MONITOR - - - TSC MSR - HT - > CPUID(6): APERF, No-TURBO, No-DTS, No-PTM, No-HWP, No-HWPnotify, No-HWPwindow, No-HWPepp, No-HWPpkg, No-EPB > CPUID(7): No-SGX > RAPL: 262 sec. Joule Counter Range, at 250 Watts > cpu7: POLL: CPUIDLE CORE POLL IDLE > cpu7: C1: ACPI HLT > cpu7: C2: ACPI IOPORT 0x414 > cpu7: cpufreq driver: acpi-cpufreq > cpu7: cpufreq governor: performance > cpufreq boost: 1 > cpu0: MSR_RAPL_PWR_UNIT: 0x000a1003 (0.125000 Watts, 0.000015 Joules, 0.000977 sec.) > Core CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IRQ POLL C1 C2 POLL% C1% C2% CorWatt PkgWatt > - - 2 0.07 2973 3493 943 0 201 737 0.00 0.37 99.57 0.12 12.42 > 0 0 2 0.08 3005 3493 122 0 7 116 0.00 0.12 99.81 0.03 12.42 > 0 1 0 0.01 2998 3493 21 0 6 14 0.00 0.10 99.89 > 1 2 0 0.01 3036 3493 25 0 13 11 0.00 0.21 99.78 0.04 > 1 3 5 0.17 2960 3493 429 0 102 324 0.00 1.41 98.45 > 4 4 2 0.05 3015 3493 74 0 24 50 0.00 0.32 99.64 0.03 > 4 5 3 0.09 2921 3493 125 0 15 110 0.00 0.28 99.63 > 5 6 2 0.07 2978 3493 124 0 26 97 0.00 0.39 99.54 0.03 > 5 7 1 0.02 3012 3493 23 0 8 15 0.00 0.13 99.84 > ``` > > On an Intel processor more C-states are shown. Is support just lacking > on AMD, or should a different tool be used? > > > Kind regards, > > Paul > -- Len Brown, Intel Open Source Technology Center