Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5525684imm; Tue, 31 Jul 2018 12:26:19 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdTWSDDHEDXKTX/5/0amQf8Q1rjsWnb7Vru19ZloYCnaYS5ndZqq1lHlgieW+X00HilZ5Ve X-Received: by 2002:a65:4344:: with SMTP id k4-v6mr21395738pgq.409.1533065179568; Tue, 31 Jul 2018 12:26:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533065179; cv=none; d=google.com; s=arc-20160816; b=dinjHv2rK9kprKL1fcub2WKEYdxmYoUI5OSQBUHEPL5umKrgS38lI3W49AhfXRh9ul IixBAIsLBojJ0FPcpwCAvcYuZfiBcSR82So5s1AhddDKoeJL45C6SPRsjjHSDFs0CtRQ sg+W0pk5ulBo1I+re6yvFOLo9hvmcmgcUOrT9hzmqjb163Wf4cu0u++7xPpVpaDogxFw 27GhZ/33GkZf8N7Kwi7IlDifUvfm6nB1upDTFA1YpMWuPcUwfKn5F3ue14sZasjr1j4G lkXvJuwBW4QOnPa7iMRXQdv3rpwNutqnlZ80DLvaORoKPPSPDKWVWjri3VfUme096xtI 3cEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=rpRxygG0xH8b/ATxjESOfarbiVHJkLqHylxqxh34f9s=; b=gBdWjJnv5u+5rUJcJMXOzx0xkPFv4nMPqVMq1hIFovt7XqfcsROwmeyflwyCSEKYBt mfbADm0uDLRp5s4xquQT90+qOQCskCmtS70LbmCnrvAq2BeHOqianMY2PdMMAY/d46OX yFXVnsXE7i5ir6LyccSD295eGk5hWGP0DnHKmiZB5+ZvhZYYOOqjDmI5619SNC4zFerA 3zTJj+0tNSPsrI63NhiH3fOoZxbuj//30Fd16qE0kBScwgQMw8Cjz2eSWlJDNDvlZz33 DXSSh6P4vu0IF2J8JsRskEoztWtgvt89l3X3OYSnL30K3U2qxBTiHmXyQnMk0aFDelFH 9WLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=k8hz+uow; dkim=pass header.i=@codeaurora.org header.s=default header.b=DlvhvW0i; 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 u195-v6si13935303pgb.443.2018.07.31.12.25.39; Tue, 31 Jul 2018 12:26:19 -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=k8hz+uow; dkim=pass header.i=@codeaurora.org header.s=default header.b=DlvhvW0i; 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 S1732219AbeGaVDg (ORCPT + 99 others); Tue, 31 Jul 2018 17:03:36 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:32848 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728800AbeGaVDg (ORCPT ); Tue, 31 Jul 2018 17:03:36 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 9B49860481; Tue, 31 Jul 2018 19:21:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1533064910; bh=G8fSbYvAX7R/oIztjQ9MgUYm0WEtwr5EgJ6Okp0t/EI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=k8hz+uowMnoOkjgBgY+xbcB8HE/s8gt7MGgYn1GkEWDxXJnYWbT9A+u5vnv+Vmvdy dN2YQrdyXtRdSK1yRpVDFIE79yfTWFAXh6oPEBXKoiW+xERi8j4Tp+e3zR6d7ySDhG CaF5kbXvbbOi72tGfrSgYgm6oJjIssb2iRC+yMXs= 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 mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id CADEB60328; Tue, 31 Jul 2018 19:21:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1533064909; bh=G8fSbYvAX7R/oIztjQ9MgUYm0WEtwr5EgJ6Okp0t/EI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DlvhvW0iHmC6Ut+766HW+E+AUswcpe3H9YGknMb7ft/c4OdAfDIEo3UV2h2vuWUv8 /1Le3GLSgZtSYI1Bj65FzTOhheF+QKtqycv57jKsZu6xfzYUEMlZuHhtTi9aWoZ2Ic owpbVNzuQme5WF9KHazawoNGDHNhvQYAG2W5SF28= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 31 Jul 2018 12:21:49 -0700 From: skannan@codeaurora.org To: "Rafael J. Wysocki" Cc: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Rob Herring , Mark Rutland , Linux PM , devicetree@vger.kernel.org, Linux Kernel Mailing List , rjwysocki@gmail.com Subject: Re: [PATCH] PM / devfreq: Generic cpufreq governor In-Reply-To: References: <1532750217-8886-1-git-send-email-skannan@codeaurora.org> <534629d03437bc8e72a62d89e726dbe5@codeaurora.org> Message-ID: <84cdf95b1e3f8b580f4d1df138aaf42b@codeaurora.org> X-Sender: skannan@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-07-31 01:00, Rafael J. Wysocki wrote: > 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. Right, but I'm not sure that's the most important aspect of this governor. > 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? Not sure what you mean here. This devfreq governor is orthogonal to what the cpufreq driver does with its HW. This is just trying to scale L3 or DDR or whatever other device based on current CPU frequency. Not all CPUfreq drivers support OPP. And even if they do, I don't see how it's relevant here. Thanks, Saravana