Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp460521imm; Thu, 30 Aug 2018 03:20:09 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbxvHnw7Or051ZMhOujntVmwUJsBdvwFroZ+MKWYCgWXBvvu4/VcS9MkKXw6X4uohz79XH7 X-Received: by 2002:a62:9894:: with SMTP id d20-v6mr9862286pfk.186.1535624409915; Thu, 30 Aug 2018 03:20:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535624409; cv=none; d=google.com; s=arc-20160816; b=B2VAJIjvxxAkMOPJto7oZUR/WnYPSCv2j2uMnbtTG+vyifKw6i99n3cwZbITv2koqL dtexomf/SiXCnJW3Ml1yxw+lqCwvQpqbgfxTTQHg10olhvohorxA6XpPuB//LUatls0D 7Vq7GN3e/2ljs8S5Z1cNTlOrheQ+9gxdzyyrmo9v3naewH6UXDXHljpqXjD48HTE5ugZ 9II9U+Yr+SJrhzeAlL6ojT3NKJClg+o0qiZ2RkZlFAPKzJsMgB1MiTL8amnYCGWqkvn/ aZWcMK1KwC7v4pzrZ+w7QB21/kCWx9e/21+e6hqynJnKJAyxE4oksFhaFNdkWsg1yYJ4 l7+Q== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=6m85EvRYC64B/C7uwg1be5xNKxpBfDJQYLlV6gsEDsM=; b=aY65E3hEEhSesUbr9ip55ZBtpIL3xkMa1ilHlDwWGJBKqwJMCmpZLNyylbt+4oEbeh KliRLDi2JuDonxvEbLin641mjEIVXA0sw+Ilz1GNne7PGLehabDTWAOh2Ojp2Mi/KYOh vn3ILzpKM6yLWLIUeXBqjucKacyetZHjEcANd8Lwtet5PTeEGRFRli/f94zOKIZioiJ3 ZglxSLyDyT7z5vfb2116/UOeoJk+JQ4VDlVnCKRN9cXkpLVcPUvbR39UGu8kOo5U2jdJ lcJxPTYWOkXMcTDmoFVa1UUCLRpak8Op4rSMrZh6NP0HcUr0Y/RVWngXWs+bJ81osfIX 580w== 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 i184-v6si6781314pfb.98.2018.08.30.03.19.54; Thu, 30 Aug 2018 03:20:09 -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 S1728315AbeH3OUO (ORCPT + 99 others); Thu, 30 Aug 2018 10:20:14 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:38972 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727496AbeH3OUN (ORCPT ); Thu, 30 Aug 2018 10:20:13 -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 070FD7A9; Thu, 30 Aug 2018 03:18:49 -0700 (PDT) Received: from e110439-lin (e110439-lin.Emea.Arm.com [10.4.12.126]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 110803F721; Thu, 30 Aug 2018 03:18:44 -0700 (PDT) Date: Thu, 30 Aug 2018 11:18:42 +0100 From: Patrick Bellasi 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, dietmar.eggemann@arm.com, morten.rasmussen@arm.com, chris.redpath@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 07/14] sched/topology: Introduce sched_energy_present static key Message-ID: <20180830101842.GU2960@e110439-lin> References: <20180820094420.26590-1-quentin.perret@arm.com> <20180820094420.26590-8-quentin.perret@arm.com> <20180829165058.GR2960@e110439-lin> <20180829172004.afbe2oukprvptqs2@queper01-lin> <20180830092329.GS2960@e110439-lin> <20180830095723.4qqbpft7gpbtgkhd@queper01-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180830095723.4qqbpft7gpbtgkhd@queper01-lin> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30-Aug 10:57, Quentin Perret wrote: > Hi Patrick, > > On Thursday 30 Aug 2018 at 10:23:29 (+0100), Patrick Bellasi wrote: > > Yes, dunno if it's just me but perhaps a bit of rephrasing could help. > > Ok, so what about something a little bit more explicit like: > > /* > * The complexity of the Energy Model is defined as: > * > * C = nr_pd * (nr_cpus + nr_cs) > * > * with parameters defined as: > * - nr_pd: the number of performance domains > * - nr_cpus: the number of CPUs > * - nr_cs: the sum of the number of capacity states of all performance > * domains (for example, on a system with 2 performance domains, > * with 10 capacity states each, nr_cs = 2 * 10 = 20). > * > * It is generally not a good idea to use such a model in the wake-up path on > * very complex platforms because of the associated scheduling overheads. The > * arbitrary constraint below prevents that. It makes EAS usable up to 16 CPUs > * with per-CPU DVFS and less than 8 capacity states each, for example. > */ That looks better to me. > > Alternatively, why not having this comment and check after patches > > 11 and 12 ? > > Oh, you don't like it here ? What's wrong with it :-) ? Was just saying that since you refer to the complexity of an algo, which is effectively introduced by a later patch, it could be easier to understand where the magic numbers come from if you keep the comment closer to the algo... but it's not really something major. At the end, when you look at the full series, you still have all the full picture... thus, if the maintainers are ok with it being here: it's perfectly fine for me too ;) > > Right... I was totally confused by the idea that we don't > > run EAS if we just have 1 CPU per PD... my bad! > > > > Although on those systems, since we don't have idle costs, should not > > be a spreading strategy always the best from an energy efficiency > > standpoint ? > > Even with per-CPU DVFS, if you have big and little CPUs it matters > _where_ you execute a task, and you'll still need an Energy Model to > make good decisions in a generic way. Very good point! ;) > But yes, there is definitely some room for improvement for those > platforms. That's something we could improve later on top of this > series I suppose. Cheers Patrick -- #include Patrick Bellasi