From patchwork Thu Feb 21 11:29:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 158902 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp373070jaa; Thu, 21 Feb 2019 03:29:50 -0800 (PST) X-Google-Smtp-Source: AHgI3IbNPO8TjM/pXSztZMJ/nfW8QiRQyhck0uwQtUxAiFT02UoAt8Kf4TUNhwvWFkLAngrurDPn X-Received: by 2002:a65:4842:: with SMTP id i2mr34121005pgs.176.1550748590792; Thu, 21 Feb 2019 03:29:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550748590; cv=none; d=google.com; s=arc-20160816; b=fOolI/CTKuXQrPhxYGb0jRHKfrp2ZCaZRKiKba22CqF5Tn79kOEAoB8ruOwzlVfPNW Cuz5b7w9hXoO2WY7W85/UT0Vx+KYHVUefVjin4EqQT9cCjwInTxvoFiO5DoYj3IlxdwL wmShWd+YT/YN2On+JGq5vg6BcArfNMJeVl+LFbTBchH7HTRL1UYsOo4if0+gvAnKFV+/ e7Ea7Vm6oG+DEBU0dQ4ReYvTsuP2c9Mx1HniLuCYoWNCbW79IMn2MFlY6RiFwaTMyBI1 TSChjpecHTgkkQ88GeN9JiItq6O5XEg7ezTyuLy5QJkU1XP0DpS8IaW4Mb8k3IYplKKs qvjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Ix1FwySAVgbgIZf9pHZHFMA62PotFx+DGTqjm2zedM4=; b=MzReo7Do4cBeBeLVbE0ZhuN2GwNw02P+DFsOWRoGVElsFaRFZTZx8xtul9bOMFiW6x GVl6+5xpb1JA6MjDDP75evnpA92wvZDFbxpCugUe9Bdh9GoKD10sbVAJsN/EmEX+fcFS aPTVlRo+l47vwM4Yup3/AsI5QeeYSKtZD+1Tzp8W3AVvoOPjE6hQ8M/UNbtc4wHAGFUg gobzlgG+tUiu+gdq9/ynkNp3sZnW4SNWLmNswCgTKBv7XXRk/53mT/t1Vaa/LF7Ryv7q jiEDB6lJRbaepCUTKSzbtx0eFlSg3JupHf0xhYon6fyxA6+o85IbF3hKNDbIcBsabRiM jZtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aYG08bis; 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; 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 b20si15802476plz.50.2019.02.21.03.29.50; Thu, 21 Feb 2019 03:29:50 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=aYG08bis; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727061AbfBUL3t (ORCPT + 32 others); Thu, 21 Feb 2019 06:29:49 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:34847 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725385AbfBUL3r (ORCPT ); Thu, 21 Feb 2019 06:29:47 -0500 Received: by mail-pf1-f194.google.com with SMTP id j5so9110958pfa.2 for ; Thu, 21 Feb 2019 03:29:47 -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:mime-version :content-transfer-encoding; bh=Ix1FwySAVgbgIZf9pHZHFMA62PotFx+DGTqjm2zedM4=; b=aYG08bisJ2AriwmT7Quk9gXRaeZyNJqVE7Q0sYlZOA4SPlZeLNEJYEgWgwRCoS/DQt y95q816s8+y70IK4KfmpcrJwZmK9y8CzXsyEzOZ3Dxf/wyvQbZoYTB7rE+PVC2BV1EFn 0o3zTh3tEEhddRIjnJEYvew2Lwor5B8vL7eEuqypjEIapjN8L+tZ17jkUpm9DXbvVqWT gfIbWJ8mjoAal47xDHqEtQbbQUmp+ebJ0P4i6FKj61ISSIDI5sBLM5nkxCmDCrECHTLQ UYRI+GCLkRWOQt2fwGBrKRO/2cRU8uHS1k/dO1XY+6jaLtEOyx1cTxLcumX6f63sVMmI 4mKA== 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:mime-version :content-transfer-encoding; bh=Ix1FwySAVgbgIZf9pHZHFMA62PotFx+DGTqjm2zedM4=; b=Nryv8yIkdEulGm6W2Oyo2/A/y2KAfTsnKidMZhIpynGYX8dWrZ3e6d1BJeU7glfHHp TNtG9aCk6Dkh6W7roP5DzX8PkDhU6RPKmzZSA0OlAV1fJv3q1Zuu+IE9TsXVkafx+W8J d4+9HLqBx0EV7gbfi5qI7BrPpiCnjzqDgPjO1RglzHgSCO55BZenarZ7JC9CIjCOtB9Q npzqJDuILPPFAzkNyC8+q9x2y8SkKRSAhdMa14woL5qEsYeKpM109mZSohyT6Uu5YwEA F63GROnBjHKXzocwMH/wB5KKdMPlNMEJV9+qSgcwU4zvkKkezvWAh1I4GBeLLgdT/veE C0rw== X-Gm-Message-State: AHQUAuZQdDMxzGJnAJnjhXFs51kE8IrtfZ4sAs3H3I1o1eoLPI+BOe7o vtjo1x1mj7MzyTXGbShTzl3Ocg== X-Received: by 2002:a63:ce41:: with SMTP id r1mr19288196pgi.119.1550748586071; Thu, 21 Feb 2019 03:29:46 -0800 (PST) Received: from localhost ([122.172.102.63]) by smtp.gmail.com with ESMTPSA id g3sm8138422pfo.125.2019.02.21.03.29.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Feb 2019 03:29:44 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Daniel Lezcano , Kevin Hilman , Len Brown , Pavel Machek , Ulf Hansson Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , mka@chromium.org, juri.lelli@gmail.com, Qais.Yousef@arm.com, linux-kernel@vger.kernel.org Subject: [PATCH V2 0/5] cpufreq: Use QoS layer to manage freq-constraints Date: Thu, 21 Feb 2019 16:59:26 +0530 Message-Id: X-Mailer: git-send-email 2.21.0.rc0.269.g1a574e7a288b MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, This patchset attempts to manage CPU frequency constraints using the PM QoS framework. It only does the basic stuff right now and moves the userspace constraints to use the QoS infrastructure. Todo: - Migrate all users to the QoS framework and get rid of cpufreq specific notifiers. - Make PM QoS learn about the relation of CPUs in a policy, so a single list of constraints is managed for all of them instead of per-cpu constraints. V1->V2: - The previous version introduced a completely new framework, this one moves to PM QoS instead. - Lots of changes because of this. -- viresh Viresh Kumar (5): PM / QOS: Pass request type to dev_pm_qos_{add|remove}_notifier() PM / QOS: Pass request type to dev_pm_qos_read_value() PM / QoS: Add support for MIN/MAX frequency constraints cpufreq: Register notifiers with the PM QoS framework cpufreq: Add QoS requests for userspace constraints Documentation/power/pm_qos_interface.txt | 12 +- drivers/base/power/domain.c | 8 +- drivers/base/power/domain_governor.c | 4 +- drivers/base/power/qos.c | 115 +++++++++++-- drivers/base/power/runtime.c | 2 +- drivers/cpufreq/cpufreq.c | 202 ++++++++++++++++------- drivers/cpuidle/governor.c | 2 +- include/linux/cpufreq.h | 12 +- include/linux/pm_qos.h | 71 ++++++-- 9 files changed, 323 insertions(+), 105 deletions(-) -- 2.21.0.rc0.269.g1a574e7a288b