Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1182363imm; Thu, 6 Sep 2018 17:22:43 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb3uPh/QsL+SfQcMANShV/GqzFReXKVVK32sZ6eO25PmGYl1Bx9P3PW1k7BKznsNGEBKdx+ X-Received: by 2002:a63:352:: with SMTP id 79-v6mr5559614pgd.112.1536279763401; Thu, 06 Sep 2018 17:22:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536279763; cv=none; d=google.com; s=arc-20160816; b=P8dpItHViSA6XtZ58axbL+wQvAva+ZnmObkRU3ZYLdI5tJ8Fntai00tfkKGWXwz35l KCI3dnVS6G3s1fzIhY5oJ80dGAIf7hgKjYM6wskdvRK1YHVh95Xb6KAFfFJbsGMqyOsm Za6CFUqOhCCgh85vE9jPnRC5dNYa3fjw7pnuqb3103EYIsHGlNB7r7qGZwz8UIUKa+Ji YMDoQWM+rTxn5DXrZag036l9O/Mm8LwBnVZI86XgmlaP7XyPuTwHSQ2KgexEdkO8sM64 4ylVgS6NPDQ8g6f76GuI4lukFrvTNzwn7uz7IShdy5arzrLJAmvqU783Y7eqD9+vn3oY ll/A== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=mi4PMcKckONe8wjSV6qCeVuIBuVNt1F/4JQAaV4k7HI=; b=fxmCiDRAm4m1uRQ9gR/WNFOFKddO1/jWRYm+qnpM0Y9DfvEg5mJhd9LmOyDXOGnLr1 TQF3hnhauKHSgCFcd/DmQd3dRxzHs3iDZs7WEwINypKzVrP4zfnwdIfaYcrSiuWbd41D a6pycTbcgQJQXvSIYwgymlCpERARSSKDePxcRVcbR79Vyv7Q7tO2NCOAx1qB8D7OVGBs GDb812T06B4PFlPwWpZhyTx9W02qSWhUyh4TDac7jgjJIeK4cH5lWWXWRmvDe5LjFNbD mEVAzDCdHJ5hs7vQzW+FACBx0zLqxOjhZpnkfgL5/AhhHLAsa7w6EGESelxm2aEzDc5O PBQQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q26-v6si6765328pgl.556.2018.09.06.17.22.25; Thu, 06 Sep 2018 17:22:43 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727820AbeIGEw6 (ORCPT + 99 others); Fri, 7 Sep 2018 00:52:58 -0400 Received: from foss.arm.com ([217.140.101.70]:52460 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726618AbeIGEw6 (ORCPT ); Fri, 7 Sep 2018 00:52:58 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 461B07A9; Thu, 6 Sep 2018 17:14:58 -0700 (PDT) Received: from [10.103.100.29] (unknown [10.103.100.29]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B0D7F3F557; Thu, 6 Sep 2018 17:14:57 -0700 (PDT) Subject: Re: [PATCH v6 04/14] PM / EM: Expose the Energy Model in sysfs To: Quentin Perret Cc: peterz@infradead.org, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, gregkh@linuxfoundation.org, mingo@redhat.com, morten.rasmussen@arm.com, chris.redpath@arm.com, patrick.bellasi@arm.com, valentin.schneider@arm.com, vincent.guittot@linaro.org, thara.gopinath@linaro.org, viresh.kumar@linaro.org, tkjos@google.com, joel@joelfernandes.org, smuckle@google.com, adharmap@codeaurora.org, skannan@codeaurora.org, pkondeti@codeaurora.org, juri.lelli@redhat.com, edubezval@gmail.com, srinivas.pandruvada@linux.intel.com, currojerez@riseup.net, javi.merino@kernel.org References: <20180820094420.26590-1-quentin.perret@arm.com> <20180820094420.26590-5-quentin.perret@arm.com> <20180906140914.noe3yz7xrb4g5sf4@queper01-lin> From: Dietmar Eggemann Message-ID: Date: Thu, 6 Sep 2018 17:14:57 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180906140914.noe3yz7xrb4g5sf4@queper01-lin> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/06/2018 07:09 AM, Quentin Perret wrote: > Hi Dietmar, > > On Wednesday 05 Sep 2018 at 23:56:43 (-0700), Dietmar Eggemann wrote: >> On 08/20/2018 02:44 AM, Quentin Perret wrote: >>> Expose the Energy Model (read-only) of all performance domains in sysfs >>> for convenience. To do so, add a kobject to the CPU subsystem under the >>> umbrella of which a kobject for each performance domain is attached. >>> >>> The resulting hierarchy is as follows for a platform with two >>> performance domains for example: >>> >>> /sys/devices/system/cpu/energy_model >>> ├── pd0 >>> │   ├── cost >>> │   ├── cpus >>> │   ├── frequency >>> │   └── power >> >> cpus (cpumask of the perf domain), frequency (OPP's of the perf domain) and >> power (values at those OPP's) are somehow easy to grasp, cost is definitely >> not. >> >> You have this nice description in em_pd_energy() what cost actually is. >> IMHO, might be worth repeating this at least in the patch header here. > > Hmm, this patch introduces the sysfs interface, not the 'cost' field > itself. As long as 'cost' is documented in the patch that introduces it > we should be good no ? I mean this patch header tells you _where_ the > fields of the structure are exposed. _What_ the structure is all about > is a different story. Mmmh, so maybe a EAS related documentation file explaining this interface as well, which can be introduced later is the solution here? I'm just not 100% convinced that those cost values are self-explanatory like the other three items: root@h960:~# ls /sys/devices/system/cpu/energy_model/pd0/ cost cpus frequency power root@h960:~# cat /sys/devices/system/cpu/energy_model/pd0/* 96 129 163 201 245 0-3 533000 999000 1402000 1709000 1844000 28 70 124 187 245 > But yeah, in any case, a reminder shouldn't hurt I guess, if you really > want one :-) Nothing which should hold this patch-set back though.