Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5065261imm; Tue, 19 Jun 2018 04:35:17 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJhmToqw6clWDWtiDbVAkGoyGMIucJfNO69e/IazN9TCRFyp6wrXlclXJitYV7OPvQOhyJ7 X-Received: by 2002:a65:46cb:: with SMTP id n11-v6mr14287719pgr.193.1529408117242; Tue, 19 Jun 2018 04:35:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529408117; cv=none; d=google.com; s=arc-20160816; b=deSF5kQ5eyP0qKw0nzRqi/twjxEuPxAB3k7zd0SKfY1ccd39YZIyTqWwwOgEI8YWB4 JynfEbgTHfAsTopkJRm3uVu3nl3MfdHcAht0gZ+dbEaoONDm5jRVXE4o2Pi6/gp5WF4P lNH8tNuNQLF+90ukGl6BJY5zS/zMnqh1CwyRBA1pEMmXWJvq9WusqbH/D+wzFGSGMmad rnGLB90odqM88R9BdU4ok5LfjZqxZM8gcU9ekP1/zxtxAFPc6Rn4JRtmwWXAjHCvpqg3 t2yQyM+AvTqAAAHWuiRwioVfOIZuyGcJylsNY9PPlXcoEtaWQt/XXDTOT9qBf6t6qMlW lMnA== 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:arc-authentication-results; bh=h3Gykf+qtTM8qu0Xtr153I8SF9mw2/V5WbY2DPw0Q8o=; b=Rc7PH/E8JD2eQDV8Z6U+yRpMg7gJxR9gBGC0xLkUINhMhnTMREHlk0g7FYv2n1hez0 7PJd7sHyz9LVahEs84gu5HbADw7/9si8/aLJovLO26TDJuUZeDZc7Yyo5YW/Pi9aQSBA JnNxeUHU/Rl7YD3kTC4yTIj/iBU6bUPP/w7DJ51m+uFiGd3xKdFuIo2ngCSN8xTyE0Ps nsoq7wSx6ItIFcZt4zeN5bmaoZ2eVnyRts9IzvdDpk4KENHE/pqpu4RThSCwe+NQG0Aa 1X0K75toVmKr1pv7vy5UepwXtAaZOlXPVCobcPR09oCdk2T4nwevW2sKF1csFEEoPeni XgEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="wA9x4/XW"; 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 n10-v6si14549170pgs.485.2018.06.19.04.35.02; Tue, 19 Jun 2018 04:35:17 -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="wA9x4/XW"; 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 S937675AbeFSLeW (ORCPT + 99 others); Tue, 19 Jun 2018 07:34:22 -0400 Received: from merlin.infradead.org ([205.233.59.134]:40256 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937499AbeFSLeV (ORCPT ); Tue, 19 Jun 2018 07:34:21 -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=h3Gykf+qtTM8qu0Xtr153I8SF9mw2/V5WbY2DPw0Q8o=; b=wA9x4/XWrVa//KkdKSdKUw8lo AtW3qEafADn9IEWRRVCdY5FZ2aMNL/ZmWwyQk6/U/bVruEaS9+MzmvVifFAMFc+0lHyAGjcU/+G19 rCmmpbs5aM26A3isFDUtAYs1kKBnnBSTXMmQB4T6DnzMB/v7ZGY3LwOPq0NwTrzKbZP3+sDA16FGa 5r5UVlTxORrjbdTk9Mghi0xS+Cvzb8iWEl8lZlHQrZmoTXppOSmBacDWS4KU7ccUDf+DeK5CdOcME C97qiF7p1yGxIlGvq92DHCRDkNpL/q1VxKrLfoNqxQShvpN7By8H/8+8Iutf5l1kOrGBiuiC+q5fU S/uH3vQiA==; 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 1fVEtl-0008Lx-U0; Tue, 19 Jun 2018 11:34:10 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 9805B2011CEBE; Tue, 19 Jun 2018 13:34:08 +0200 (CEST) Date: Tue, 19 Jun 2018 13:34:08 +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 03/10] PM: Introduce an Energy Model management framework Message-ID: <20180619113408.GQ2458@hirez.programming.kicks-ass.net> References: <20180521142505.6522-1-quentin.perret@arm.com> <20180521142505.6522-4-quentin.perret@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180521142505.6522-4-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:58PM +0100, Quentin Perret wrote: > +struct em_freq_domain *em_cpu_get(int cpu) > +{ > + struct em_freq_domain *fd; > + unsigned long flags; > + > + read_lock_irqsave(&em_data_lock, flags); > + fd = per_cpu(em_data, cpu); > + read_unlock_irqrestore(&em_data_lock, flags); Why can't this use RCU? This is the exact thing read_locks are terrible at and RCU excells at. > + > + return fd; > +} > +EXPORT_SYMBOL_GPL(em_cpu_get);