Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3966369pxb; Tue, 10 Nov 2020 04:57:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJzUjqqMG4Yr41moKQ2SR5EeL825OCoLfhmyV/6ORjrxUzjQ4SyEXDFhDf7qJIyE/F48ps81 X-Received: by 2002:a17:906:1317:: with SMTP id w23mr19423576ejb.120.1605013023163; Tue, 10 Nov 2020 04:57:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605013023; cv=none; d=google.com; s=arc-20160816; b=uQaJUI+Npeq3NxAYm+0QweW0l9BwnCZczKKQUZIlJGY5LlSgc9vymyihN1ZyVdFxO3 t9eUFJv45/KFDwIqrfPfc0mlfrwjbyaScS5qWo5gIxArOZwU2xr7io5Y6EvV6alDmGYw VXY13Mvtygmz4zS67zbZzyJvUs6d83PpN008mkSYo08JqDN/tJ6j4x1Gm6Xf6lwSaCk/ l8mhLPrSjC/iy8PxUrNO0qJAH75de6mGtTY0OTn28g49Lyc21VwgZcEsOqixJ/3kV2Cb 7IUYLmSlxBpt00WV2A02jLaq+efVDcc6asjGaViGTL70KztYm0840tAMQNmuOWRs+z6K WT9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ONh7LJZ9/Qwoc1+dJXbewB1DCjAmKyz1PWub7Lo5558=; b=U8sLU1HOS2O+GxI1NTNmyExJoUKE4Y/832aeLg5MLXWu+zKyYdGpHbqj4hX9/mfz1X FTQZSsvgcYYmt+WxG2zb9j7s1gwi6HGLCo6LFzJ81ytsVxquiHHEF8CJiaj0aJPs8yOb dirjU6vDVHT5AI3P4MMTUIMnnmiXK4s9p1POKJVK8/Qh5Eu3yyAL5eWDRTEtg7CKYw5E 0U6vdmTE6kZ/4hzUlq35HW7MoiHK6JdhFx2yTdTxjWJYRRyt4zgQqyrzmE1d3OVyfN0N eEsIMimnSIchy9vo1YCoUx3OROa8dRAyl0lLZ0dWtyeIh0+mo8V0ma8IOI6TJrG6NHLh D5FA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r25si2931767edw.82.2020.11.10.04.56.39; Tue, 10 Nov 2020 04:57:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730317AbgKJMxL (ORCPT + 99 others); Tue, 10 Nov 2020 07:53:11 -0500 Received: from mx2.suse.de ([195.135.220.15]:60656 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726721AbgKJMxK (ORCPT ); Tue, 10 Nov 2020 07:53:10 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id A4F4CABDE; Tue, 10 Nov 2020 12:53:09 +0000 (UTC) From: Thomas Renninger To: Rafael Wysocki , Viresh Kumar , Jonathan Corbet , Viresh Kumar Cc: linux-pm@vger.kernel.org, Vincent Guittot , Shuah Khan , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cpufreq: stats: Switch to ktime and msec instead of jiffies and usertime Date: Tue, 10 Nov 2020 13:53:08 +0100 Message-ID: <1832747.5iOEhN7m9D@c100> In-Reply-To: <0e0fb542b6f6b26944cb2cf356041348aeac95f6.1605006378.git.viresh.kumar@linaro.org> References: <0e0fb542b6f6b26944cb2cf356041348aeac95f6.1605006378.git.viresh.kumar@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Dienstag, 10. November 2020, 12:07:37 CET schrieb Viresh Kumar: > The cpufreq and thermal core, both provide sysfs statistics to help > userspace learn about the behavior of frequencies and cooling states. > > This is how they look: > /sys/devices/system/cpu/cpufreq/policy0/stats/time_in_state:1200000 399 > The results look like this after this commit: > /sys/devices/system/cpu/cpufreq/policy0/stats/time_in_state:1200000 3830 How would userspace know whether it's ms or 10ms? whatabout a new file with the same convention as cooling devices (adding ms): > /sys/class/thermal/cooling_device0/stats/time_in_state_ms:state0 3888 > /sys/devices/system/cpu/cpufreq/policy0/stats/time_in_state_ms:1200000 3830 Somewhat off-topic, some ideas: I wonder how useful these stats still are. CPU_FREQ_STAT is off on my system: config CPU_FREQ_STAT bool "CPU frequency transition statistics" help Export CPU frequency statistics information through sysfs. If in doubt, say N. Iirc this was a module at former times? commit 1aefc75b2449eb68a6fc3ca932e2a4ee353b748d Author: Rafael J. Wysocki Date: Tue May 31 22:14:44 2016 +0200 cpufreq: stats: Make the stats code non-modular outlined 2 problems with cpufreq_stats being non-modular, but also seem to fix them up: ... and drop the notifiers from it Make the stats sysfs attributes appear empty if fast frequency switching is enabled... Thomas