Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4856926imm; Tue, 31 Jul 2018 01:01:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfKai3f2JOKw3zdcWLrb9NVBNshhUjhRMsqkogFabDEgCo1y8CrlvhO9Pqs/SwaBpJrnP5M X-Received: by 2002:a63:686:: with SMTP id 128-v6mr19224534pgg.338.1533024104011; Tue, 31 Jul 2018 01:01:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533024103; cv=none; d=google.com; s=arc-20160816; b=mynYKh3K+DEWAvmd706FUMjCuaRgWER1/qV4KDN7rrgjUd3CNTe49NsRCcjTfJcAH5 cVrlrysQvz+nS2MP1hUBNEPB4URqhOoRrCe1GUHCzXcxRyD9U2nSgemEErv9YWgx36ao ZepH+Mcvdzegp56fUOYa4jwXPOXpC/l0zN6XxXqUNQCF2gdu6fFScKszCU4QUJZ4cOKB A5x39HFS61XizwZi8FUV04+VVe8pdsZof9LcLRtCp44Yxe0WN6shX+iJWuI3F55U+ASB Gtn80z7faN36Y3jA70BLAdt25LUKyTYHI4GJBgIigjIiX3RsPVntdHg4jHw3m+MGiEA3 3P5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=4LFGO3vfeqaGUEywzbWbQQYuApoEQgeDKVJCDqgteqY=; b=noVUeZUYH2YdLoD01DQmhx6/BALPNr6mx3sJcqpMVU+KP5bvUgsLyZ/56GoNYqAPFS A46/3ZnehW53F22T/Ap2BSu72rJgWWij0rQG6g/29TduDWCCiquaU3nQBvECRuRa0zH/ oB4jnbo0wDaay6m2fK/2gjz0s7b/7PUMeuEIoJ6wqvBcepa3qRUEqhnuTw7+xhg57W3H NWhgqCnUo8LEUEIGPoRrNEJGxs/WN6tXlA/q3yMQEYfGPiRh+lo+994d0olKtNKDO/mB jFJlaxrHjTELK0AZaKElL3hQszM9kBe+OEjTS2AqdLdP7ggVC+RHFcuf1eRbhx2PIAS8 aXZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=NFiscG9d; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v16-v6si12570765pfm.341.2018.07.31.01.01.29; Tue, 31 Jul 2018 01:01:43 -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=fail header.i=@gmail.com header.s=20161025 header.b=NFiscG9d; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729768AbeGaJjT (ORCPT + 99 others); Tue, 31 Jul 2018 05:39:19 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:40507 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727279AbeGaJjT (ORCPT ); Tue, 31 Jul 2018 05:39:19 -0400 Received: by mail-oi0-f65.google.com with SMTP id w126-v6so26265839oie.7; Tue, 31 Jul 2018 01:00:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=4LFGO3vfeqaGUEywzbWbQQYuApoEQgeDKVJCDqgteqY=; b=NFiscG9d49HxidY8lx0jGbcYTk3PwgbjhENGfTFJSXIeru3xNoyBBHNrR8zjOqfUKN EEmeTnLk29ERiVOHw03gI2GJ290ROPXrXauTG/iJqbZAcaiO8iIzQvSoN1jMgR4511Bc hm9MUtvPqq05eLt7XWqy3pmD/vq67UrhxZJUx4CLLL9OELEn9Jqdr64t0SJWvZRnv1nY TsC1eLZlusBQXjG9wZ7ogBfMTk/oZ8DB2pWeZRNHv+UT+xhFB99CYJ6QIhouaGKyeI16 bqemE7S9oT867lxNttA9t3OJORipqGqrg4BXvSlzbyS15xp4T+aG8sPoY/770SFYice8 JeOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=4LFGO3vfeqaGUEywzbWbQQYuApoEQgeDKVJCDqgteqY=; b=sz0m6CRzD+QAZ89ddy0fyFyeE44vPSWiDtl+DQb/2DV1xv08DlOMMuRgrJnTameQlx gIGUC/HCLWhDNC3V997KZw7oabJM+wF23pT1fIJ4tTnzxUGCW0xDNIUpGgSPq2gULeif o7d6Bj3F5TUc91s4REFhc98o/sewsM2Fuo/z5YEJ7bIEqLF0l9G98+yRwqbV3dGThaXi zvKNX5r+mAfl2w9BZ46emV9kRuOmHhajVGldErvbozZiKTYlRHbL60NbkgVztFTg64HO 6brOt74qGee4u+FxgNsMFLxcd+LlmFvzERyUUrEFoB7BA3Ovn3BCaI2ygYr2qNH0dfEI 02Sg== X-Gm-Message-State: AOUpUlElAY00qFk8jLcv3w0Oqg8RkdIY/JJL+ZCAJ1BTl3JWpBtEvJWx JbaTtCqHkb0dxPEaExRPfIipfMBmb+1i9UZNRLw= X-Received: by 2002:aca:b841:: with SMTP id i62-v6mr20299953oif.358.1533024013586; Tue, 31 Jul 2018 01:00:13 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:63d2:0:0:0:0:0 with HTTP; Tue, 31 Jul 2018 01:00:13 -0700 (PDT) In-Reply-To: <534629d03437bc8e72a62d89e726dbe5@codeaurora.org> References: <1532750217-8886-1-git-send-email-skannan@codeaurora.org> <534629d03437bc8e72a62d89e726dbe5@codeaurora.org> From: "Rafael J. Wysocki" Date: Tue, 31 Jul 2018 10:00:13 +0200 X-Google-Sender-Auth: ltZVTwZ_lfG_XGWNPUxLEnohmAo Message-ID: Subject: Re: [PATCH] PM / devfreq: Generic cpufreq governor To: Saravana Kannan Cc: "Rafael J. Wysocki" , MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Rob Herring , Mark Rutland , Linux PM , "devicetree@vger.kernel.org" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 30, 2018 at 8:58 PM, wrote: > On 2018-07-29 03:52, Rafael J. Wysocki wrote: >> >> On Sat, Jul 28, 2018 at 5:56 AM, Saravana Kannan >> wrote: >>> >>> 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 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. >> >> >> While not having looked at the details of the patch yet, I would >> change the name of the feature to "Generic cpufreq transition >> governor" to make it somewhat less ambiguous. > > > In my opinion it makes it look MORE like this is a cpufreq governor. How > about the following? > PM / devfreq: Generic cpufreq to devfreq mapping governor > Seem a lot more clear to me. Well, it's not just mapping, but also it triggers on cpufreq transitions AFAICS. Which makes me wonder if the approach here is the right one at all. Shouldn't the cpufreq driver be hooked up to the related HW through the OPP framework and sharing access with devfreq rather? > I'm open to suggestions for the devfreq governor name too. "cpufreq" has > been very confusing so far. > cpufreq-map maybe? It's more like "cpufreq drriven" IMO, but I don't really have any good names for it in mind ATM I'm afraid.