Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752244AbcKGEic (ORCPT ); Sun, 6 Nov 2016 23:38:32 -0500 Received: from mail-pf0-f172.google.com ([209.85.192.172]:33606 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751425AbcKGEia (ORCPT ); Sun, 6 Nov 2016 23:38:30 -0500 Date: Mon, 7 Nov 2016 10:08:26 +0530 From: Viresh Kumar To: Markus Mayer Cc: "Rafael J . Wysocki" , Power Management List , Broadcom Kernel List , Linux Kernel Mailing List , Markus Mayer Subject: Re: [PATCH v2 2/2] cpufreq: stats: clear statistics Message-ID: <20161107043826.GC21030@vireshk-i7> References: <20161104165536.20088-1-code@mmayer.net> <20161104165536.20088-3-code@mmayer.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161104165536.20088-3-code@mmayer.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3042 Lines: 82 On 04-11-16, 09:55, Markus Mayer wrote: > From: Markus Mayer > > Allow CPUfreq statistics to be cleared by writing anything to > /sys/.../cpufreq/stats/reset. > > Signed-off-by: Markus Mayer > --- > Documentation/cpu-freq/cpufreq-stats.txt | 6 ++++++ > drivers/cpufreq/cpufreq_stats.c | 22 ++++++++++++++++++++++ > 2 files changed, 28 insertions(+) > > diff --git a/Documentation/cpu-freq/cpufreq-stats.txt b/Documentation/cpu-freq/cpufreq-stats.txt > index 8d9773f..3c355f6 100644 > --- a/Documentation/cpu-freq/cpufreq-stats.txt > +++ b/Documentation/cpu-freq/cpufreq-stats.txt > @@ -44,11 +44,17 @@ the stats driver insertion. > total 0 > drwxr-xr-x 2 root root 0 May 14 16:06 . > drwxr-xr-x 3 root root 0 May 14 15:58 .. > +--w------- 1 root root 4096 May 14 16:06 reset > -r--r--r-- 1 root root 4096 May 14 16:06 time_in_state > -r--r--r-- 1 root root 4096 May 14 16:06 total_trans > -r--r--r-- 1 root root 4096 May 14 16:06 trans_table > -------------------------------------------------------------------------------- > > +- reset > +Write-only attribute that can be used to reset the stat counters. This can be > +useful for evaluating system behaviour under different governors without the > +need for a reboot. > + > - time_in_state > This gives the amount of time spent in each of the frequencies supported by > this CPU. The cat output will have "