Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5132784imm; Tue, 19 Jun 2018 05:42:07 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ1XyUZti7yKzYseiwqukxEoMPpjMfnoE9icCXLq9UdxxrTp2Clmg04NpDbzUxUkxKQpmfn X-Received: by 2002:a65:6645:: with SMTP id z5-v6mr3614953pgv.71.1529412127820; Tue, 19 Jun 2018 05:42:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529412127; cv=none; d=google.com; s=arc-20160816; b=jc4fQN8Mr2DVnhI9SGD3RwcM3WgyYUuiNrY9kxD5Nk2nwZ1ReIASSL01RTu4Q6NpAU kLD3iUf5ivtizU9Fv6I96dH3J+cbgyY9iuezaFGvbPZjm3kxgWI7MiGJ11275Ph1weyt fxZbFWMom/ERKj4K+FuJje8ao0ILiTchszNaq5NeBRP+oqpHAEwZV9Al8Qrb2MOqCO6p ngHXyM398eY6tvIlqMr3G40+MJDLMuQ723G7Q4zx5Lnq0LqN2qu+lxYSxCBJkhRoM477 /hmLmnJRRdxEsIdnCoks+JpCw5yP7kbyNIW/ElSkW+TZSFOS4tksgUoemDQ8mpaVAHCj SapA== 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=g7x7toTu3FB0irr6+WdhBEDOBNxD5HI/h+uK5wpRMOM=; b=dGoWZQvemKvCN6biJwe+zNjU6vxBTrgrflLB3FVSPw8v6bAC6ITvG95kFzGMqSPpOk iJpuKlfCoCOGGCAXOcGasKUALASGTSI57Bfk/WYW6wFFVaw07rIs6yhQJF5r/Nv8TCIu Qy60Palr3cZzCsc2B3bMhokPJdgHXbJhSXKSTTVHluYTynExxpNoecS2kydBKPcQU8Bw 3BjUwv6CPmBsw2ca6ipyYRR6qpXld/1b54tZZTDcILTzioRiCvxDohXTMaLIuSYiWMwH xz3ZLQWufMwSbsWBj4A+VQPoeGhPyRLFfTNMudOc9AtsehJ8zHS7abfAZI8zEzohghK3 jv9Q== 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 t64-v6si18588497pfb.98.2018.06.19.05.41.54; Tue, 19 Jun 2018 05:42:07 -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 S937825AbeFSMlG (ORCPT + 99 others); Tue, 19 Jun 2018 08:41:06 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:49000 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937705AbeFSMlF (ORCPT ); Tue, 19 Jun 2018 08:41: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 D493B1435; Tue, 19 Jun 2018 05:41:04 -0700 (PDT) Received: from e108498-lin.cambridge.arm.com (e108498-lin.cambridge.arm.com [10.1.211.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DFCB23F557; Tue, 19 Jun 2018 05:41:00 -0700 (PDT) Date: Tue, 19 Jun 2018 13:40:59 +0100 From: Quentin Perret To: Peter Zijlstra 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 03/10] PM: Introduce an Energy Model management framework Message-ID: <20180619124058.GX17720@e108498-lin.cambridge.arm.com> References: <20180521142505.6522-1-quentin.perret@arm.com> <20180521142505.6522-4-quentin.perret@arm.com> <20180619113106.GP2458@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180619113106.GP2458@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 19 Jun 2018 at 13:31:06 (+0200), Peter Zijlstra wrote: > On Mon, May 21, 2018 at 03:24:58PM +0100, Quentin Perret wrote: > > + read_lock_irqsave(&em_data_lock, flags); > > + for_each_cpu(cpu, cpu_possible_mask) { > > I know we're likely to only use this on small systems, but this pattern > is a very bad, Please look at alternatives. Ok, this isn't supposed to be called very often (only once, at boot time, for Arm for example), but I see your point.