Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5108699imm; Tue, 19 Jun 2018 05:17:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK7nZ1uF77URyNqHwyLNZni3gRlBMyletSudpYOr2O/S22Oq4wCWL2g4GfVoBx1HAM5hagL X-Received: by 2002:a65:62cd:: with SMTP id m13-v6mr15128890pgv.207.1529410672680; Tue, 19 Jun 2018 05:17:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529410672; cv=none; d=google.com; s=arc-20160816; b=C6sjoR/VMoar9fJZVgh2J8v3YUjUNjI1TwL0hJL2aHrsKVVG80zl9DzT7OJDPmezUY 2Yuai8kbm4guCfkgmQqJLwTxLBY+a0N7lzr0g/4CaSJ1v96ImGeYfjqBCdUNzUcRpxXh HLCv0SUVRuEPg6KJldAY1641bDi+YupxU6aeeyVMYlvJ5Sce8TGGogk5NRKc1Hd91U+d iDSqHssgNLvKdlO2bzTHDNPJNZnk8xSaTMRn9ObwYJZY4UmRQBVyu2mic4qMkL7+yjds ZxobGR5eqawdZtX+tZlRyfXsP1j9GtiIwcyG+U1qBk7R9empcQJwl5hg4l+Cu7Pi39pL i9QQ== 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:dkim-signature :arc-authentication-results; bh=1dzmC3Mzna+twPUv7L4VaBr6JbLEIedbKn+bVpIqn0U=; b=AL4c8WSlhE4/Aqzo+voA/GCLIRGghxTpTrImEZeps+07DXlqk2lzZLhj93NxUE0meR jn9vwU60SS3HFkgX546JWkpSXudgonDr9t4p+wIQT26Lib9OCt6UexC9zwb71GO2Xmkm 4Adx4VW9s/zzXMz1aAiQ+8EItzIfBOQpic0T13J+nTgoWpDxo3m6ZtfKgEjhZE8rTvGh rmYDECHm1Py1T/tNeU/46qt2AUUc++NlB+6qw1sl7EXI/Wok4ZFyiwWIiZ275YFqOKbo VpvBO58F1Oma+Tt/eEYtXtUKSOvU2AATlbdeAgakt9sPCuyHJkOIOilzVEJ5iNoi3eDv CMkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=PIIIAnGb; 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 w21-v6si17030112plp.199.2018.06.19.05.17.38; Tue, 19 Jun 2018 05:17:52 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=PIIIAnGb; 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 S937745AbeFSMQ7 (ORCPT + 99 others); Tue, 19 Jun 2018 08:16:59 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:60114 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756675AbeFSMQ5 (ORCPT ); Tue, 19 Jun 2018 08:16:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1dzmC3Mzna+twPUv7L4VaBr6JbLEIedbKn+bVpIqn0U=; b=PIIIAnGb4fM7gQXua7Yih5pAU9 rZFMr4oTXuwa92O4G8F13D/cW5BRCKmdK5BZ2uX65w4CQ8pK4HEJ+dL54Z0lGT5nQvrhoxzuuq6IE KiSDZVZSFakVkgF0CJMuSqYWKBnLOYW+/U5heqERz5b/Q3Yfb5jnIa3YqWDSbUhwacHVd34A/k3GI ywvjcetHV2+CO5gRn08/niOOK8BJ5zO05GSO/ZJG4yxFsjjjlL5bmdicqqwl2iY+wxpgwEtcml4YM 7oIMamOolsPJMj9GwdDZCgXQXqQ6NmndVuW6l+Lxy3g9nYUvrK4Qzd+nQcaUDS33MewtC1JfpD82G aAw4eYuA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fVFZ0-0002JY-4J; Tue, 19 Jun 2018 12:16:46 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id E2CFE20268507; Tue, 19 Jun 2018 14:16:43 +0200 (CEST) Date: Tue, 19 Jun 2018 14:16:43 +0200 From: Peter Zijlstra To: Quentin Perret Cc: rjw@rjwysocki.net, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, mingo@redhat.com, dietmar.eggemann@arm.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, joelaf@google.com, smuckle@google.com, adharmap@quicinc.com, skannan@quicinc.com, pkondeti@codeaurora.org, juri.lelli@redhat.com, edubezval@gmail.com, srinivas.pandruvada@linux.intel.com, currojerez@riseup.net, javi.merino@kernel.org Subject: Re: [RFC PATCH v3 04/10] PM / EM: Expose the Energy Model in sysfs Message-ID: <20180619121643.GR2458@hirez.programming.kicks-ass.net> References: <20180521142505.6522-1-quentin.perret@arm.com> <20180521142505.6522-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: <20180521142505.6522-5-quentin.perret@arm.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 21, 2018 at 03:24:59PM +0100, Quentin Perret wrote: > This exposes the Energy Model (read-only) of all frequency domains in > sysfs for convenience. To do so, a parent kobject is added to the CPU > subsystem under the umbrella of which a kobject for each frequency > domain is attached. > > The resulting hierarchy is as follows for a platform with two frequency > domains for example: > > /sys/devices/system/cpu/energy_model > ├── fd0 > │   ├── capacity > │   ├── cpus > │   ├── frequency > │   └── power > └── fd4 > ├── capacity > ├── cpus > ├── frequency > └── power > Given that each FD can have multiple {freq,power} tuples and sysfs has a one value per file policy, how does this work?