Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp585447imm; Thu, 6 Sep 2018 07:12:00 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZEypQXtFgsfw5qF74a7mcygicvFyCZvNPQsIQfUhj3QpffaVNTRkHr3dHjYGU40jimGs9H X-Received: by 2002:a62:1bc2:: with SMTP id b185-v6mr3056004pfb.170.1536243120792; Thu, 06 Sep 2018 07:12:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536243120; cv=none; d=google.com; s=arc-20160816; b=TaBBGHSkxbhL8c1lRHq5HGinJ6lWrJihHoWDTpiS+BNtRIdEtCmyDsTG041Xqawh9v dZMrz8JnATbkYtyrwAKkRh5xEs5gczmlDCDOhIOgJdNhQJCg9eoneXkr5iqn6L9W1OgE kQ2GyT/I5PMGssMrWz4ZGOopaO1SoU49jEr/ANf/iRzo8urb/wavNnroyXYp+xcbEB1U adGrI8YhF72xzxEbjBViZQgTbCC9+FHvLve0+evKwrbUJA+32f88B5cbobaYTubxVUHt 5w80nxKgJyE6Y9Z3U9oWGf9GNrh9uhmxSM7qvKe3m3pFHtIRKUxxyEJGdeTrXX0I0br/ twTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=1f4nuQT0hfXxGQ6NLnQGQ3ZE8GhozUPEkUSQ1eY2ob8=; b=DdThegejBxZSo/6OQQJ0otZDu2Y9m0nB5KAIkw6TgddNi/DHs3xT2bD6R5Buk5Vryx dBkvR7c0L6LOIJeXM1KcEd301zVH0g51B1FmqCNhldsLzEDMOXSSHDweWPeC43aMp19c DcQ2nIW/oVNbuqUSzjpxULeRMhGGDSQSr+iAEtRDS8HuccpaCBpo6ko5T6/S2pNDGCOb WLy/wO8Idkv/MtdNXm2c8LzTpplLmaQDvHa3FMkY/Kw4toBuQfg4lNIPo8nNW7Q5icse LyrATR3GmHQHjza29og122nrw9j673HEbX2lD/RILPtZan2vJ9C+1dDTMqbwsz15W75M G0Sg== 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 v70-v6si5376646pfa.103.2018.09.06.07.11.45; Thu, 06 Sep 2018 07:12:00 -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 S1729429AbeIFSpF (ORCPT + 99 others); Thu, 6 Sep 2018 14:45:05 -0400 Received: from foss.arm.com ([217.140.101.70]:46394 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726837AbeIFSpF (ORCPT ); Thu, 6 Sep 2018 14:45:05 -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 DE11B80D; Thu, 6 Sep 2018 07:09:21 -0700 (PDT) Received: from queper01-lin (queper01-lin.Emea.Arm.com [10.4.13.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E89CA3F614; Thu, 6 Sep 2018 07:09:17 -0700 (PDT) Date: Thu, 6 Sep 2018 15:09:16 +0100 From: Quentin Perret To: Dietmar Eggemann 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 Subject: Re: [PATCH v6 04/14] PM / EM: Expose the Energy Model in sysfs Message-ID: <20180906140914.noe3yz7xrb4g5sf4@queper01-lin> References: <20180820094420.26590-1-quentin.perret@arm.com> <20180820094420.26590-5-quentin.perret@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. But yeah, in any case, a reminder shouldn't hurt I guess, if you really want one :-) Thanks, Quentin