From patchwork Mon Jun 10 10:51:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 166303 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp872939ilk; Mon, 10 Jun 2019 03:51:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzKbzYCW6MQ23/H7xW1AiDYJWlpCg4P8892AR9qxOqaduJLPx+9eRidSehE6I3hhL60kHEE X-Received: by 2002:a17:902:5c2:: with SMTP id f60mr69609007plf.61.1560163912757; Mon, 10 Jun 2019 03:51:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560163912; cv=none; d=google.com; s=arc-20160816; b=Gm2vI50PnwgYyL9z2/ELuxQbi7OmZ1BNtXhuv3UvhJkCpoglSXmQ621O2QYbmXWYf4 GzO9con5qet/UY0c+ecglQEp+wy7fqnzKhzE+oyFh+wV/mjtVl/WPEJEm5XRaHVUofZv nmTZkOlClFlSIEA4OI7u7LssoGgtv41eNyFvUuIrnuXI/i+0Piqf5KlGGi4BVMKqAX8R H6iOts7y9NNkcHCM01pzFpwUGpvXOKUSjCstBk7uS2t8zPm1IHqq8liZo2y/BNKNdX1M dxk7PTH4H7t+PbgVyqLQ+HfZJIyM8IRZzs4xllhnTddYD7LkqNQV8A4BwWHytNcZadaW qa3w== 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=4nrRXRZLGYNCevB7P9G3OypvWpceLIiQ3ZsEEykg2uo=; b=uaqMZj+Dnt4fmlkmSn2FMNK1pyX/BNI5Oo/8FVMOz5AdUztoHaIdRxUQWX4JYOagHn ATdjytXuH/4cbwsFDHpBf/dBmQ0zgs/L0giV2lhVJXpI0SCkM7h9oOCwIoB6F5uA9p12 T1o6cyRhjV4ENj/TQrxDcUdzos6OitT3nNp2mhSvizuLnNt8zgl2kMRhebr7219BW5wx PZSGkqWCq1c4JP1o3L3l9eawuUh0jgnuZezlOqhJbX4ky+Fk7Tj8lzkKWbOPLZ8S5xXU K8OfxhoiapyvlvaD8z2G0xEqhl9hkw+vtu3gezScH7bQDNdboyoZHSaK+n+1FrUiBeP9 pjoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kcgbprTv; 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 h13si9520504pgj.204.2019.06.10.03.51.52; Mon, 10 Jun 2019 03:51:52 -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.s=google header.b=kcgbprTv; 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 S2389551AbfFJKvw (ORCPT + 11 others); Mon, 10 Jun 2019 06:51:52 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:41183 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389548AbfFJKvv (ORCPT ); Mon, 10 Jun 2019 06:51:51 -0400 Received: by mail-pf1-f195.google.com with SMTP id m30so4573478pff.8 for ; Mon, 10 Jun 2019 03:51:51 -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:mime-version :content-transfer-encoding; bh=4nrRXRZLGYNCevB7P9G3OypvWpceLIiQ3ZsEEykg2uo=; b=kcgbprTvW7V6ti9e2eqMCTo+r0IkcXNP3aoI3bJr+vpxKG+hZGfrsF0QSplUGzrwhp 1hYixkVbW/8RDdREbEjyH9YJhd4IaqEOTSw7d6xsjNLU1vmIbUdhVafW6PHj7jJEuy6G D9zC/DPQBUzyhzTb7Lt+YgG7+YJXTozze7YjSvSQ3r/gy31bFfbXIJrbgnulgLqLIEn2 Vy7H4zYXdhAgTdqSn174uwtPI64/2dEj9dydKFIIvo17BE0sGuxjyag/dj7mX+b2L4ZC PZs6ufhW5SkDVK4ygXKSkxzmIc8efcnz0IsMSGDPXVEcX7R3NNesnOBojR1dShR0bn29 bVcw== 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=4nrRXRZLGYNCevB7P9G3OypvWpceLIiQ3ZsEEykg2uo=; b=pj9RVzXWuVzFFgR2JWvup1fZWYePx/eAag1fSw/TcW2Z3EXKDMtvWJ5GCsdArB8aLH CFHCimuJb2Ad68eY6vby4Kdrg27feVtBU6BRYurOpuw1zK57LEC/Z+n69h1Jaw8i+CI8 XX65hSUtFOEA2/+hX90hHH/d8XbYcdd0B2/9DKNIAvmpvPtWIun1pQqdV7Lf0Lvjv0sv bJSWd9fhDTEVvd0gkw8+ggUqmwwQ3wRurju6a5PEubSInFtR8OOswpH7B5D2y9dsQVeF YOBD1YKASCVQPFZyNRmA5BBkYtSwqGEp09o+lncyfr9ujKFWz8DxIX1YHyhQ1SC+stuE O1RA== X-Gm-Message-State: APjAAAV9ziQDDmDnKgeQZEfCoBaxZ99B8AhRDS6BsUkn/Xm5McdznFzt f0SQVmdjZ2KKb9Vi3yPk5bDEDA== X-Received: by 2002:a17:90a:a785:: with SMTP id f5mr20588788pjq.4.1560163911094; Mon, 10 Jun 2019 03:51:51 -0700 (PDT) Received: from localhost ([122.172.66.84]) by smtp.gmail.com with ESMTPSA id y22sm5484067pfm.70.2019.06.10.03.51.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jun 2019 03:51:50 -0700 (PDT) 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 , Qais.Yousef@arm.com, mka@chromium.org, juri.lelli@gmail.com, linux-kernel@vger.kernel.org Subject: [PATCH V3 0/5] cpufreq: Use QoS layer to manage freq-constraints Date: Mon, 10 Jun 2019 16:21:31 +0530 Message-Id: X-Mailer: git-send-email 2.21.0.rc0.269.g1a574e7a288b MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@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. V2->V3: - Add a comment in cpufreq.c as suggested by Qais. - Rebased on latest pm/linux-next. 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 | 203 ++++++++++++++++------- drivers/cpuidle/governor.c | 2 +- include/linux/cpufreq.h | 12 +- include/linux/pm_qos.h | 71 ++++++-- 9 files changed, 325 insertions(+), 104 deletions(-) -- 2.21.0.rc0.269.g1a574e7a288b Reviewed-by: Matthias Kaehlcke Reviewed-by: Matthias Kaehlcke Reviewed-by: Ulf Hansson Reviewed-by: Ulf Hansson Reviewed-by: Ulf Hansson