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: 10823809 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5B73C6C2 for ; Thu, 21 Feb 2019 11:30:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47D97307FD for ; Thu, 21 Feb 2019 11:30:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 45FC930886; Thu, 21 Feb 2019 11:30:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8CF1307FD for ; Thu, 21 Feb 2019 11:30:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726260AbfBUL3s (ORCPT ); Thu, 21 Feb 2019 06:29:48 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:43793 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725991AbfBUL3s (ORCPT ); Thu, 21 Feb 2019 06:29:48 -0500 Received: by mail-pg1-f196.google.com with SMTP id l11so2154052pgq.10 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=qhm2X/iJEAc9T3fEENyNNADAPVz94RbYVVQZJyDXS/h/X5XaUPKknux4Ft6OAgd4Xz 1oY80HRstCnrflrVg5k+SHRSQ0lwAgWA5pUyIjFwX664zWeTqAPPU8tBZ4Eb8w9rXKLT Qoexp3ftxOBlEQa9l4nTkpyEoFJXiAXTNXJY4u6Rm2a7weTcW6yQQlbyk+5NSNb/cuhR yjUEue4SjW6Ay54N0077ly8klIvDO3N3o6rvvkZLt0cVNa79D0Em/kMHB1bRDr62uOmF GIWSaAjpQHpcUJXWGi0Ycflk1VfgczHcrZ6zaAXLRDbCr+Bx+O8A9mHxkhGiUWrGcDEV nsDQ== X-Gm-Message-State: AHQUAuZl82oSixIBB5GYiRER/T5RTKiThcdpQES8VEjlSXX9VPGhTOvA RrNraFdFsyPcr2IrA2tSiz9RKw== X-Google-Smtp-Source: AHgI3IYv2mQBRiIJTHZEkl4L4R9icmaCw41d+jXlgs+ncNjTDinzUFUhJfbmXFyomQD+z3vmp8tQOA== 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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-)