From patchwork Thu Mar 9 11:45:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 95112 Delivered-To: patch@linaro.org Received: by 10.140.82.71 with SMTP id g65csp318893qgd; Thu, 9 Mar 2017 03:46:19 -0800 (PST) X-Received: by 10.84.133.193 with SMTP id f59mr16660222plf.64.1489059978944; Thu, 09 Mar 2017 03:46:18 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h71si6247740pfj.139.2017.03.09.03.46.18; Thu, 09 Mar 2017 03:46:18 -0800 (PST) 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; 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 S932298AbdCILqH (ORCPT + 13 others); Thu, 9 Mar 2017 06:46:07 -0500 Received: from mail-pg0-f52.google.com ([74.125.83.52]:34420 "EHLO mail-pg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932299AbdCILqF (ORCPT ); Thu, 9 Mar 2017 06:46:05 -0500 Received: by mail-pg0-f52.google.com with SMTP id 77so25636370pgc.1 for ; Thu, 09 Mar 2017 03:46:04 -0800 (PST) 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=E2JnNiU/ziBoafIEzAz45JYOXAZL/fjsOX/5uP1aWO0=; b=GZ9027mWGUXzKeb54UF+uYmuBX8hxsY/Gvoa8XnDUK8+nc+a6sVScZS/xBN11uo3Ra 9akwEjoTSgo9yQLL9z1aIrvozZ31Xbmlj/JgSuhA5Xqln1fEeC+jZw+2j0iEm9SZ4D4M UdnFQY/SOoo6iaXSN9fKsO+kojwkBTtc+/IDQ= 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=E2JnNiU/ziBoafIEzAz45JYOXAZL/fjsOX/5uP1aWO0=; b=Bx7a6wpoGT0jnyCXBBzkBX2HM/BXwNSluNwiO4xcxTfkfbkThrM3vdf7ADg1dbYVnx +60TUU34oo3edGZ9rtjatLt30ebLDjSNHnBVB8UJXQnuAXoeztemBv1KJ8iNfMAXaxGr v6DCNzewANAvnq/31l9f2H7YObRGrlStqCzW5Wr5TjxihOODJeEBPal6HJDk4YmSSQ6s LXZt513mn6/VvllF8NfvWkjRgh7j+0S+BWN8uhBXkCJYWzwTHgsdREHv7P9KFi9TJ3S9 +punz4nnMTsomDquAdGqGIY9fNF37h9fqOm8aFwhugulsDhsBexGBqpjh+coGJw53zlp 2kYQ== X-Gm-Message-State: AMke39lZFQIi/Et7lcV9iPaaW0wtXZekNfqFk1XbXAzZyNJwk2dABxwKrM/dryTz0a+weJIk X-Received: by 10.98.26.199 with SMTP id a190mr13394274pfa.63.1489059964150; Thu, 09 Mar 2017 03:46:04 -0800 (PST) Received: from localhost ([122.171.239.200]) by smtp.gmail.com with ESMTPSA id k76sm12105791pfg.42.2017.03.09.03.46.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Mar 2017 03:46:03 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Ingo Molnar , Peter Zijlstra , Srinivas Pandruvada , Len Brown , Viresh Kumar Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot , smuckle.linux@gmail.com, juri.lelli@arm.com, Morten.Rasmussen@arm.com, patrick.bellasi@arm.com, eas-dev@lists.linaro.org Subject: [RFC 8/9] intel_pstate: ignore scheduler cpufreq callbacks on remote CPUs Date: Thu, 9 Mar 2017 17:15:18 +0530 Message-Id: X-Mailer: git-send-email 2.7.1.410.g6faf27b 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 From: Steve Muckle In preparation for the scheduler cpufreq callback happening on remote CPUs, check for this case in intel_pstate which currently requires the callback run on the local CPU. Such callbacks are ignored for now. Signed-off-by: Steve Muckle Signed-off-by: Viresh Kumar --- drivers/cpufreq/intel_pstate.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.7.1.410.g6faf27b diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 3d37219a0dd7..bd60f1cd7ea6 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -1930,6 +1930,9 @@ static void intel_pstate_update_util(struct update_util_data *data, u64 time, struct cpudata *cpu = container_of(data, struct cpudata, update_util); u64 delta_ns; + if (smp_processor_id() != data->cpu) + return; + if (pstate_funcs.get_target_pstate == get_target_pstate_use_cpu_load) { if (flags & SCHED_CPUFREQ_IOWAIT) { cpu->iowait_boost = int_tofp(1);