From patchwork Mon Oct 29 07:17:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 149631 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3778840ljp; Mon, 29 Oct 2018 00:17:52 -0700 (PDT) X-Google-Smtp-Source: AJdET5fJhOQkcanThO8PIuThEXLt3hV622RlZkfc7Puplllu975I55WaKxbiewuGVhKJC7MdnSfm X-Received: by 2002:a62:e707:: with SMTP id s7-v6mr5280805pfh.124.1540797472304; Mon, 29 Oct 2018 00:17:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540797472; cv=none; d=google.com; s=arc-20160816; b=gY3Vv1kN6V0JeskJ0shhvRG133OEI6GGVLj716QQuTJidd5lr6ZYFaaiYeZgHf3HCI RrdWvIpS6pQQj/mUBQdAKvAVYAQo8XyNf22TUHBx5W05J6kXGhEMrX4YaCyBTVglSOF+ 0iueq8nD+UKAEBp2WDuGT+a5iGLrMV63/jIVQJMs7pVIxdgxHTeuCiTq+Lomt7ZkYuZ5 4nVNaaH7COf7dqQfobw0B1PLLt4GKRXsZQW592cTVg+EvSZAlQ3Z9wYfAL2sFt92e1YU H+PAFRHLdI99JtqZutjeY78US9QiRSFDxY5Wxsc2C8LhyNxf0jUY7pH2Tf6h3cjslcxE 5XTg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=FDlV+Xbz1j+NaR368L2vTpe24uF3g5mlaQe0xzBflGQ=; b=DBdM/LRxMo46mXZykGT8hy15s9nlKM6LLa+zBEpeBN5hgY2l4GOpEqe4U6kYEZGfH3 omX2oyRSYrzHPfzUarvz6SeqTF4ERnTsds/1yVpgA9+VxNOVIducfWN66w7f9xlO8igE zqQGjN9JxeTdJriYpb26W622yRY+MqqnBGV+b+22sYKAGDKjYvkeC97yPLkxdGrnaX0P gCimPRh5Bj5AfNDaFNXkzjfdq8vivRfe7pG3tADRZp5kiWedMinMxfs0ePkCBNHMU1Wd QMj4LfOERHVGalSzBkOn5klVqy1H8anyKs25PbKFmTcswV/d8IG6ALboWdMNSeG19xo/ Yi1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gI1N7dBt; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m9-v6si19067959plt.28.2018.10.29.00.17.51; Mon, 29 Oct 2018 00:17:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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=@linaro.org header.s=google header.b=gI1N7dBt; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729401AbeJ2QFO (ORCPT + 11 others); Mon, 29 Oct 2018 12:05:14 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:39895 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729149AbeJ2QFO (ORCPT ); Mon, 29 Oct 2018 12:05:14 -0400 Received: by mail-pl1-f195.google.com with SMTP id b5-v6so2735548pla.6 for ; Mon, 29 Oct 2018 00:17:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FDlV+Xbz1j+NaR368L2vTpe24uF3g5mlaQe0xzBflGQ=; b=gI1N7dBtcaiUljcwKUPdD0lhNurPTNaQ728+UNi7gvxJ9tn08e3Hm9+efVxFd0rBys 42/qKw4i8NM/Sfjbc7JzC25VK7t8intb8J4+L6fWaZ5K1BvEDUSDCE1T7qsBBebA4EEr NQRzQ6Iq6VRZ6d1kjnvDcJg+Io97QQKRXkeWk= 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:mime-version :content-transfer-encoding; bh=FDlV+Xbz1j+NaR368L2vTpe24uF3g5mlaQe0xzBflGQ=; b=OrlyygyADC4U/17tm8hgJnJT7FNDZ4PSxCgPLwlRM5IRSNam43peZp6B5GjI36X9KF sXM90r3xSNmrUCSEiDCdav6xISEnmpDdXCutIx3C8vqnwzeJO5gM5BESaiI9/2oG95ux 4aGktiM1gXkPhO21F2ak+L2BHtAmN5SJ3jt4fTMboXSV+jWyjAxMjvdDrm5DmwzJKTjv tHGRLmGSCcTS+MUOTm21PWM6rsVzaZJ4tF0HTVVAGKCY8NuFjiTrkDJjhs6QBYGLI/FG t43xserEyU+t/3peu0WVdNgeEkxFIRttoSp14ZI2UwG3+AwLkhziwndOzm5mocxI8WNB nE/Q== X-Gm-Message-State: AGRZ1gKCsxJB1OCwd0KSIBcLVBfZqTPeLevGxjnddC7lpEcc6AlhfIs+ JjDYYpKugAgFfP94yWIlrOPuXg== X-Received: by 2002:a17:902:f203:: with SMTP id gn3mr12600884plb.93.1540797469909; Mon, 29 Oct 2018 00:17:49 -0700 (PDT) Received: from localhost ([122.172.56.94]) by smtp.gmail.com with ESMTPSA id b16-v6sm21538679pfm.145.2018.10.29.00.17.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 00:17:48 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Jonathan Corbet Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Pavel , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Documentation: cpu-freq: Frequencies aren't always sorted Date: Mon, 29 Oct 2018 12:47:40 +0530 Message-Id: <844626b372018192fd0e9fe399343e09ef4dc842.1540797432.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.19.1.568.g152ad8e3369a MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The order in which the frequencies are displayed in cpufreq stats depends on the order in which the frequencies were sorted in the frequency table provided to cpufreq core by the cpufreq driver. They can be completely unsorted as well. The documentation's claim that the stats will be sorted in descending order is hence incorrect and here is an attempt to fix it. Reported-by: Pavel Signed-off-by: Viresh Kumar --- Documentation/cpu-freq/cpufreq-stats.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 2.19.1.568.g152ad8e3369a diff --git a/Documentation/cpu-freq/cpufreq-stats.txt b/Documentation/cpu-freq/cpufreq-stats.txt index a873855c811d..14378cecb172 100644 --- a/Documentation/cpu-freq/cpufreq-stats.txt +++ b/Documentation/cpu-freq/cpufreq-stats.txt @@ -86,9 +86,11 @@ transitions. This will give a fine grained information about all the CPU frequency transitions. The cat output here is a two dimensional matrix, where an entry (row i, column j) represents the count of number of transitions from -Freq_i to Freq_j. Freq_i is in descending order with increasing rows and -Freq_j is in descending order with increasing columns. The output here also -contains the actual freq values for each row and column for better readability. +Freq_i to Freq_j. Freq_i rows and Freq_j columns follow the sorting order in +which the driver has provided the frequency table initially to the cpufreq core +and so can be sorted (ascending or descending) or unsorted. The output here +also contains the actual freq values for each row and column for better +readability. If the transition table is bigger than PAGE_SIZE, reading this will return an -EFBIG error.