Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1287982imm; Wed, 1 Aug 2018 13:17:37 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfNvvpb4tYdQAkrZDedZlqavaaj6MyEEIyNgVLjFguHTznwstzpcRG2o3cp/EhPcmDHbX5K X-Received: by 2002:a65:4c41:: with SMTP id l1-v6mr26347568pgr.310.1533154657567; Wed, 01 Aug 2018 13:17:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533154657; cv=none; d=google.com; s=arc-20160816; b=D1dArwTQ++v1rAaqiMddqZRXZcRcoRDmwJ3t2gYtUjEEE44pcnrtY/ICoi+IqmnuY7 7kFFPeblJFPoZ8tJn6nDATxDUlEqYGSFzaUfURPdbZs9YALcftkutBQsP0K1ACOyH40s lj1jauqRH+2OoSxAh8pEjMumpD2pWleaLKx3wVDgxF3n1VewN0u7p2jWsY/cJg+xMTm2 bg1LB/IAOFonkaui+DCxuOG25SQDrVg0l9bWimNaFRT2VkuCtueL6rwfuW3jBkP48yII /yfp9LOx0fpOvBwV/gIu7ZtKHU+qT0fxpVzeY07W/gBEkO9RmdTO9d4Hs6I3lh7HZYa8 Pvxg== 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=3qvxpLADsT216jPnWSIv7IvR1eJ3MjLBB85clDyo+h8=; b=K6jPzHoFAmdMhZaTW9QLkUQSjujwuh6jwzcmZEEXhGHDpxWH/nuitmfE1VU+Y64PZd W+3X7jDqpT0pwlhoZpQhkj6nQivQyBDDtt4v4yxrXC9rCPYAej9stZ4Wwbz8FGhvd8bc 62KF9c0qFjY6I8c5MoqXNkT/b25TNW82sRWwzgAO9m+Fz/hJjtH20+RMujI2H+v4gJSj x40adMj1aozadzOkkf23Bu1o5jLjNZDa3krTmMxWkvYHvO1DhYlGDirL/SaOceb/Z5kw LZk9TA7BwJnu/s/QCkSsip/2cAX7GIWw3SBicrttDQ8qH/5SQeRenDi1N7bNlux3t87L e2Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Fh7n09AW; dkim=pass header.i=@codeaurora.org header.s=default header.b=DWKekog8; 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 25-v6si17897036pfp.108.2018.08.01.13.17.22; Wed, 01 Aug 2018 13:17:37 -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=Fh7n09AW; dkim=pass header.i=@codeaurora.org header.s=default header.b=DWKekog8; 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 S1732190AbeHAWDl (ORCPT + 99 others); Wed, 1 Aug 2018 18:03:41 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:44840 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728918AbeHAWDl (ORCPT ); Wed, 1 Aug 2018 18:03:41 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 788A760714; Wed, 1 Aug 2018 20:16:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1533154572; bh=zhqD3on1ElNtPRwFYUhYiQEPukuMr+WwZ2Llmjz4Igw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Fh7n09AWFhQ4MDnOH6J7kjlE6eg26N5lx6eR3QXoyyZCFogTqmhRiPvF+G28avhF2 NAc9B4NkzUDnfQbuw9K3VGiNn8AmPM6YSmAUo1BjaRFpGGH3ulC8Vcbk1M0vNsDvNu KFcru4+IC5+Z08CPHYfl8wv71HDySkalPLpzfRjM= 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 D1BBD6035F; Wed, 1 Aug 2018 20:16:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1533154571; bh=zhqD3on1ElNtPRwFYUhYiQEPukuMr+WwZ2Llmjz4Igw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DWKekog8nLbWmxoMRcESPbIc1jvUBQsYLKKmhvcCqtNEBDGFDNuzYG0uT8NkwYr5E u1DEm4SMjmr1iWzTQSbrKMDt5OrkGfyGhhxNYEhp7pDefgcZ5E2nVf2iP1imONN6V7 tKRMnvw6FqPaNrWQLpCPqJ4ykeInJ7TirAZffd58= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 01 Aug 2018 13:16:11 -0700 From: skannan@codeaurora.org To: Sudeep Holla Cc: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Rob Herring , Mark Rutland , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PM / devfreq: Generic cpufreq governor In-Reply-To: <2a9bfa53-31b2-b44a-0bd5-07bcc344a466@arm.com> References: <1532750217-8886-1-git-send-email-skannan@codeaurora.org> <2a9bfa53-31b2-b44a-0bd5-07bcc344a466@arm.com> Message-ID: <07f57aced47960cf48f273d6446b4221@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-08-01 09:03, Sudeep Holla wrote: > On 28/07/18 04:56, 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. >> > > Is this solution for the old generation of SDM ? This code isn't even specific to Qualcomm chips. Let alone a specific generation of SDM. > I have seen newer ones have some kind of firmware interface/hardware to > deal with CPUFreq. Do you need this solution for them too ? You are confusing two completely unrelated drivers. This is generic *devfreq* *governor* code. I'll be renaming the commit text like Rafael suggested. Something like: CPU frequency to devfreq mapping governor. > If yes, why ? Read the commit text. > IMO firmware can arbitrate various requests for frequency > scaling and do the *right thing* for the platform. Firmware (if any) can arbitrate HW that it controls. DDR and interconnect is not something a firmware might control (or should control). > Having OSPM sending > separate requests for such bus/interconnect might end up with > conflicts. > No ? If some chips have firmware that takes care of everything, then you obviously won't be enabling any power management code. Thanks, Saravana