Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2810482imm; Wed, 3 Oct 2018 09:28:59 -0700 (PDT) X-Google-Smtp-Source: ACcGV63fjnQBqtu6nAEB4/R7hS+nPwZkwl9LSyVaAP2IytduURUwFXowNoC8LnXiv6oZr0xHNEi0 X-Received: by 2002:a63:2066:: with SMTP id r38-v6mr2044668pgm.289.1538584139773; Wed, 03 Oct 2018 09:28:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538584139; cv=none; d=google.com; s=arc-20160816; b=IDugN28D5d6ORLK7m1QOJRFt29nzTt32ZSimH5zAnFEFYwkOam73n+tD+MqW9Bn0G1 rkb8WXy8jFcDSXctCqOURCqc7oSQLaPDCqk7lJ23kCsRrUs9p1yZflb2kqJKIKKoh+sB 1i1DOeDif7VDRVYg4UzCG5JECm0Ru2MJDknP2VmqxIX0ZauE+RMJimRhH9k3AO1b2iXv 1LD0REw3FiReO9sbvQAu+KprcvI6y0zC4eOJ5Uekb86VPr4f0kTjmP6CHQxZprkM2I6Z E2ff2rUkVMm0N5LQ91U1OfsHSvnlqgj9UEffH8w/tfudk3bkWAS9bwNgvOgzxvtQvX6T 5vqg== 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:dkim-signature; bh=kQ1rRl9OuXdMPdG1ow54PfPs+MXmgNyULwmAPnsnDKE=; b=g5NGsJ+XpIPDhe2pBqcQdBFumIDJYiaOrJQNwUjrA8cbOPs/KMXKUx0XJNmu4aEJ/g u+oyknIePDQabIdNaXKw/COcnO1heOG6QDMNWkzr+R7WIppl0HYcMXhsRWGNaDjS8vsW pmn5rLEN2gB2fqjBBVjQqXYyTsPP3BJVOFaJVH59xXBCzndKHz/5R3bmDwYLNXkFNSJx eLkqsgpNnuQjMMjM7dhm54iZHWCIB1MyfADaMXgW9B+Gx+A5oT1RqiCy1PPj33rjt4Bo cC1Y6tkH2UHbimp+VPehhgX7c4J2S4i3YsnK7ysVl85as+2GO4t1b8i9aPPs0ajs9PO1 Kz5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=1GWNKazE; 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 m12-v6si1968807pll.105.2018.10.03.09.28.44; Wed, 03 Oct 2018 09:28:59 -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=merlin.20170209 header.b=1GWNKazE; 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 S1727164AbeJCXRX (ORCPT + 99 others); Wed, 3 Oct 2018 19:17:23 -0400 Received: from merlin.infradead.org ([205.233.59.134]:42912 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726811AbeJCXRW (ORCPT ); Wed, 3 Oct 2018 19:17:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding: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=kQ1rRl9OuXdMPdG1ow54PfPs+MXmgNyULwmAPnsnDKE=; b=1GWNKazEoWJlaF1t376iBN8Pc 1VGpGS+INFRN3WhECbG2pYvU2cw8svjpOnWKFIJropfvJW04Tq1On5XS1WCWsZItm7Wm53za40Jta 32uwhi/2NCU1DWM1UIKHM0hMnU/jq69KkGDL3V3tK9HYU17zhvGuy7m1BxEFcJpxZPfO+CkNw4L3z PAV1PBj2TWyKxR5rEa7KpBsjAia4eesy4oPpBAjpJL0hNswjhQyaKVP60WhoHWA5QTXbgCIhRjaCQ XNydPJZbUcR+Q0gZ8nheOoiMMsiYEgvjofyZLyDxPiocGTysNlwVxbB2ksE0SQxkJCRtlTiQ5QKKP tPM/Dh4Qw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1g7k0D-0003JM-Ql; Wed, 03 Oct 2018 16:27:58 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 4115520289D0C; Wed, 3 Oct 2018 18:27:19 +0200 (CEST) Date: Wed, 3 Oct 2018 18:27:19 +0200 From: Peter Zijlstra To: Quentin Perret Cc: 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, 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 v7 08/14] sched/topology: Disable EAS on inappropriate platforms Message-ID: <20181003162719.GB19252@hirez.programming.kicks-ass.net> References: <20180912091309.7551-1-quentin.perret@arm.com> <20180912091309.7551-9-quentin.perret@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180912091309.7551-9-quentin.perret@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 12, 2018 at 10:13:03AM +0100, Quentin Perret wrote: > @@ -288,6 +321,21 @@ static void build_perf_domains(const struct cpumask *cpu_map) > goto free; > tmp->next = pd; > pd = tmp; > + > + /* > + * Count performance domains and capacity states for the > + * complexity check. > + */ > + nr_pd++; > + nr_cs += em_pd_nr_cap_states(pd->obj); > + } > + > + /* Bail out if the Energy Model complexity is too high. */ > + if (nr_pd * (nr_cs + nr_cpus) > EM_MAX_COMPLEXITY) { > + if (sched_debug()) > + pr_info("rd %*pbl: EM complexity is too high\n ", > + cpumask_pr_args(cpu_map)); > + goto free; > } I would make than an unconditional WARN, we do not really expect that to trigger, but then it does, we really don't want to hide it.