From patchwork Thu Jun 29 05:26:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 106604 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp704005qge; Wed, 28 Jun 2017 22:28:09 -0700 (PDT) X-Received: by 10.99.119.198 with SMTP id s189mr13833203pgc.32.1498714089065; Wed, 28 Jun 2017 22:28:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498714089; cv=none; d=google.com; s=arc-20160816; b=pZe+k2txygPhbFjSgNjitNJZdNCCl5YN70tdAGbKvqgsQjUhKV4fTnfktKGJazo4+b Nao0DJsR/zVp8F3YIU4p6Lds3DbAvMkgc86uNXtIFbsb7k3kSHpqU3P08c7vvRcqeWl9 yaxbAIOIiGQ/xTaW5mkCaqIFUTsHPtKwee9GW8gb30zyzyGdRTa+ep6pripVEf6w3YLw W42riEdxOvyvN0k+iP/rXlrzzY+ehFJ+U7wDSN+BUEiYUFZKrqhxywvu1InjSSphJDA4 0EQloVF4Rji3jIBz/7+JTbKqinzPd/dot6nZFjgLV/K9nf/LvmSw8W8Sf2MNPGMGFu2j 62Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=suJX4jpvnY27qyC2MbUcO33HPa2ywrjUQqBDc0z23xQ=; b=R2Q6hhnZhc03wwUVlLPGG2w2+RzebyV+IesG80eiuc8xJ3uqJeVLS2UqnZmjGrAcbW wzCDoqQ8juv8FQZT3SDU9wA4VM9uJsrATWfSgpC4tkRqhPIMxmyD+G6KIIR4pQWwf09j ccP9bg3x1YAGUtgTAgd1ui5blxcVpbrpk3IL92s2jh6SBd8Zg7BzJ5r+xSKD0KkuQ72r 03kcCLEREYX09csWOn1VKhp9peOLKVMsiJ+uX7guhwos6d7DZonSJfhN/86H3tqebwiG 3LVf4rxkR+ZQZ7agZHLEodESEZAVagoikQcV5FUD6Qc+JJXWtP9iaw1pzHYaOBxT4Zoq A+1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=SbbAdZ1L; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l30si3223664plg.391.2017.06.28.22.28.08; Wed, 28 Jun 2017 22:28:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.b=SbbAdZ1L; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751681AbdF2F2H (ORCPT + 14 others); Thu, 29 Jun 2017 01:28:07 -0400 Received: from mail-pg0-f52.google.com ([74.125.83.52]:36582 "EHLO mail-pg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751893AbdF2F2A (ORCPT ); Thu, 29 Jun 2017 01:28:00 -0400 Received: by mail-pg0-f52.google.com with SMTP id u62so42283863pgb.3 for ; Wed, 28 Jun 2017 22:28:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=suJX4jpvnY27qyC2MbUcO33HPa2ywrjUQqBDc0z23xQ=; b=SbbAdZ1L5kRMjkQiKqGbC2e4EmJeDBqbKjEiitNGFkJp+6pd8NXWIeCymi3obXjhEe keIJBTXdewQ4r4CpKtqOL7q+JdCHZ3Tbx0YWVusWx8ADTlwdO2t0k53TEa/qzj5jutDD +JkUYYMgXPDMFreGyytClotavPVtcBW911a9c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=suJX4jpvnY27qyC2MbUcO33HPa2ywrjUQqBDc0z23xQ=; b=SLagAFg9CKmrw+EWdDPLkkSoOW2pOncyspFxQGd6vKBkwTGsa4ESB0Au9dgp1fzpVc pg+R5zMlMN5QDjan+lTLGfTnakLphJUbkheZzPMaav7s1HMxemJKTADuJOo5dngKqOCH r6Du8qe+eRCAEQWe6a7VPdT/pF9Q5Gbv1DqnXS+REqiPnCDTmNc6YLhiyTCQk6+tooiR UsyN6umEjE5ZVXaQbKtjO8JMQiKK1vOchdx1EetCh6k+JYzY0GQpshTUEC+CmNlnP5Io 3wbL4Qa/BR2q2pIlou+fntpRSSLttM/fwtNNjH8+72pEU2JZeIWoJKArejMxpQ0zZML+ TqRw== X-Gm-Message-State: AKS2vOyJVMoamRzbHbR748M1kpDnOlQU7Jg2UteoOgHvGro0/P9sk4o9 3gGFZUMwQmZvJil6 X-Received: by 10.84.132.106 with SMTP id 97mr15824761ple.234.1498714079495; Wed, 28 Jun 2017 22:27:59 -0700 (PDT) Received: from localhost ([122.171.238.149]) by smtp.gmail.com with ESMTPSA id v17sm10037561pgn.4.2017.06.28.22.27.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Jun 2017 22:27:58 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Ingo Molnar , Peter Zijlstra , Viresh Kumar Cc: linux-pm@vger.kernel.org, Vincent Guittot , linux-kernel@vger.kernel.org, smuckle.linux@gmail.com, juri.lelli@arm.com, Morten.Rasmussen@arm.com, patrick.bellasi@arm.com, eas-dev@lists.linaro.org Subject: [PATCH V2 2/4] cpufreq: governor: Process remote callback for shared policies Date: Thu, 29 Jun 2017 10:56:31 +0530 Message-Id: X-Mailer: git-send-email 2.13.0.71.gd7076ec9c9cb In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org This patch updates the legacy governors (ondemand/conservative) to process cpufreq utilization update hooks to be called for remote CPUs (i.e. For updates to the runqueue of other non-local CPUs). Based on initial work from Steve Muckle. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq_governor.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.13.0.71.gd7076ec9c9cb diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index 47e24b5384b3..0b49fc8bb91d 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c @@ -275,6 +275,10 @@ static void dbs_update_util_handler(struct update_util_data *data, u64 time, struct policy_dbs_info *policy_dbs = cdbs->policy_dbs; u64 delta_ns, lst; + /* Allow remote callbacks only on the CPUs sharing cpufreq policy */ + if (!cpumask_test_cpu(smp_processor_id(), policy_dbs->policy->cpus)) + return; + /* * The work may not be allowed to be queued up right now. * Possible reasons: