Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4234531imm; Fri, 18 May 2018 01:27:33 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoZt6NejIyrrBSnuIWSFT+bcfZeSemdPbZvpUPAMf6LAELDQbQCHHzJ3PIQ3iq2ymNiC7pn X-Received: by 2002:a62:4b16:: with SMTP id y22-v6mr8492302pfa.29.1526632053148; Fri, 18 May 2018 01:27:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526632053; cv=none; d=google.com; s=arc-20160816; b=q3+q/NJFMe+lK74Mj1skZeHgXeIFEG6p0nnmIBbnIjtcNWaIna8NxbXSiCLifkGkiW k64kctUnXyVrNYbMjKSY/PkNKrRF2AJniDSm4v6Ol+FXz584KzCSDnZH7v/fs4/CHa+R afnWEDVeHTCDW/ViB0wFrDBR717C3+Dp1YikiOS0zf0uVeq2oqr9u2qDvA4sn+Y5SLWI 4Omszdat1GJ4IgxuvG1mvZehFnJizlAQJKwqRcgAxyW9b0TRIBPM8cRxDs5r1inLWpt0 DgWZZzmwiPzstiNMAmr9DhhtLjpOB2uE29hN1h/MhHVjrEeUaBrEkcK9gs9Nlzk/DTw6 DNMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=wD5NviAr5t7DRUQ6eW1jDKtLnE++dD91ZjrNsvlPS+M=; b=af5Ttz+iiqjIU8mv3wkHOSFgYvtf5tJPZS/uzstfgzZyvTfrjcEGchCOtyW9mECUz1 6ELIntauGyTiSfkNLBszB2CoLzewe5t5+aRgqs7J5fe3b00G5M8kEn/7i4qDpnpoSpMO /nuX/oHixvjk6gz70quyC6DEt7Yol9TxEgUgBxZByWhtG/tVp2U5Y0U0qSB4LLj+TJN2 2GwV0JrFXX+R5aroVizdw4ZfrQAEQpuaOtBq3zhkTgoBo5+0w2Ni12RSmocIH49YrTFb ciqZLujHNi2c26ZZGntJje2ADgpbqouc9AsYTKMp9uLiTeHm7xAuAvhAhwUJdrAq2KKq hUJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=jTxVzvcb; dkim=pass header.i=@codeaurora.org header.s=default header.b=OAyfDFHe; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x187-v6si5821378pgb.335.2018.05.18.01.27.18; Fri, 18 May 2018 01:27:33 -0700 (PDT) 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=@codeaurora.org header.s=default header.b=jTxVzvcb; dkim=pass header.i=@codeaurora.org header.s=default header.b=OAyfDFHe; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753926AbeERIZD (ORCPT + 99 others); Fri, 18 May 2018 04:25:03 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:57142 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751744AbeERIY4 (ORCPT ); Fri, 18 May 2018 04:24:56 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B7BCA60F5F; Fri, 18 May 2018 08:24:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1526631895; bh=QaBVN/FkgWs5jHkPUeVWqR0ERvax2emUrqkrlRSO62o=; h=From:To:Cc:Subject:Date:From; b=jTxVzvcbQKsNdFtHaQJ4Jtv3Ho6YossVyDGHzyVMZX5LzeunboY1SCzNswSPs/3qb nogysi8I+j1QsmiTDN4rqcjexpY4MioQdm8Kw3T8z5F5k/F7AJpA68TrHrY9dkubv4 ibNNxdWRDBVBlZCVtHr6c38/IRxH/mLyMZC7ozdE= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from skannan1-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: skannan@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 3531C60D81; Fri, 18 May 2018 08:24:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1526631894; bh=QaBVN/FkgWs5jHkPUeVWqR0ERvax2emUrqkrlRSO62o=; h=From:To:Cc:Subject:Date:From; b=OAyfDFHetZFwr/546ES+zjomoqA++EeGjsBv2JEdHRFHzevRu7usgbB1+Y+myBcIG sIk7RL3I6cEy8iHpxBw93uYjjUtho1KFVunOlK2fGViUGaujsOgGHLWBUaRnIdvI6P qDYijmmMuiPwxfbfApNY1Ermw+FrBoNeNw+Zz6kI= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 3531C60D81 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=skannan@codeaurora.org From: Saravana Kannan To: "Rafael J. Wysocki" , Viresh Kumar , MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Rob Herring , Mark Rutland Cc: Saravana Kannan , Rajendra Nayak , Amit Kucheria , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 0/2] Adding support for scaling cache/memory based on CPU frequency Date: Fri, 18 May 2018 01:24:46 -0700 Message-Id: <1526631889-5084-1-git-send-email-skannan@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Many CPU architectures have caches that can scale independent of the CPUs. Frequency scaling of the caches is necessary to make sure the cache is not a performance bottleneck that leads to poor performance and power. The same idea applies for RAM/DDR. To achieve this, this patch series adds a generic devfreq governor that can listen to the frequency transitions of each CPU frequency domain and then adjusts the frequency of the cache (or any devfreq device) based on the frequency of the CPUs. To decide the frequency of the device, the governor does one of the following: * Uses a CPU frequency to device frequency mapping table - Either one mapping table used for all CPU freq policies (typically used for system with homogeneous cores/clusters that have the same OPPs. - One mapping table per CPU freq policy (typically used for ASMP systems with heterogeneous CPUs with different OPPs) OR * Scales the device frequency in proportion to the CPU frequency. So, if the CPUs are running at their max frequency, the device runs at its max frequency. If the CPUs are running at their min frequency, the device runs at its min frequency. And interpolated for frequencies in between. Since CPUs/clusters can be hotplugged and their policies disables, this devfreq governor also has to listen to CPU freq policy notifiers for these events. So, this patch brings back the policy CREATE/REMOVE notifiers. Saravana Kannan (2): Revert "cpufreq: Remove policy create/remove notifiers" PM / devfreq: Generic cpufreq governor .../bindings/devfreq/devfreq-cpufreq.txt | 53 ++ drivers/cpufreq/cpufreq.c | 16 +- drivers/devfreq/Kconfig | 8 + drivers/devfreq/Makefile | 1 + drivers/devfreq/governor_cpufreq.c | 628 +++++++++++++++++++++ include/linux/cpufreq.h | 3 + 6 files changed, 704 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/devfreq/devfreq-cpufreq.txt create mode 100644 drivers/devfreq/governor_cpufreq.c -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project