Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2805798imm; Sun, 29 Jul 2018 03:54:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd7sHgbiLQVtSRZQ4u2qHl+OL7LKirdaZ4tjG6fJXQ32Ie/I5yeFksRizx9GSyoSGtfxvkb X-Received: by 2002:a17:902:758c:: with SMTP id j12-v6mr12512293pll.195.1532861665213; Sun, 29 Jul 2018 03:54:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532861665; cv=none; d=google.com; s=arc-20160816; b=SyqDnC5pkEnZ+tKICnqZ9B0ST9DkryPag8iwkmXcGjMD2rgaPbIs5mX4Xs8pm60HB7 /oT8TP+d2VV5tqi1hA1uydqPYi6DHN7wuaa1jTegwZPgJClIXEm9uKBwAzGALbJ07zYx 5AEDDnZEY8raTuGOBCSDME8yeUPkHLRXYsEhUIFJNkEp0GeCz4lzH3yBmViE8+DVXgPS FyW2UGMJ/gDGfOQHp7StrXqqgztiN5qSDqvCoD9wTZRYudKyuWaIOuya3n2+n6h2AH80 pg2cbDIzMjrEVeVt7blzD41S6+YfvOd6AVZjhvx9qgF5qGWwQo8BdWyjFWGhmUT3sJhK E5CQ== 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=t4YKe8PI/APTpoq9R2skXAv8xWrHif4se99u244LeJc=; b=BN7IbjVI2SmVAdnkoxbh38f45mM9lBgNBmH205lD3n+Ye0gTUp3TirFtBuWdOZ1A/F ZKOKiLjyETzCkt7Fmw579GJA4hVYxqCJIbvzgRlN4nIi+XIsrR4aF/Q8VrL9PXRwGrhX 2xTkROYiy0DlAPfqgpslaJ8KB9qCcjUCqjJOL+hpMdHScYyuBNQ1NzycrfH/c4l7Jd9f W2zil/B7PvAty15kOsauO21xOSa9JKxRb203hAbAKo0i59tVkfIlasg9DILRZtpzrYhg P4P49toc0hQFABXw7lYNk1d6g88B3i/NAkR6A9lAZz5mO10R7r7fOI2d5b0LR/O5fHvs FYpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=FHMldbGa; 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 y92-v6si4218297plb.378.2018.07.29.03.53.41; Sun, 29 Jul 2018 03:54:25 -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=FHMldbGa; 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 S1726398AbeG2MWF (ORCPT + 99 others); Sun, 29 Jul 2018 08:22:05 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:41509 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726294AbeG2MWF (ORCPT ); Sun, 29 Jul 2018 08:22:05 -0400 Received: by mail-oi0-f66.google.com with SMTP id k12-v6so16426871oiw.8; Sun, 29 Jul 2018 03:52:03 -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=t4YKe8PI/APTpoq9R2skXAv8xWrHif4se99u244LeJc=; b=FHMldbGaxH6oujdARhMhgoY8MQMRHYpPVub7wrDQUkbkoQ4IPP5f2Q4iJGvFwJO3zE f4BDgiNRhqjxBBDyaVcyN4nSWv4bLsFvilEG7hfA5AXK0rcNXwLqdhjUrEyFDaIpgql8 EdiAQPZcx5zdKvV92f3tK7mbivpLPtGlP4Uj3lPpDoaSl3WqSkPPcfL+87wneaqq2l3c 5pisLTj/tl4KhANo3a80sCKIHku4jUsBFLHFmyxoi5ZgYqH48SW0w9fhnqThePw0fMdA 8AMl/6qJWHNh050XUTgvT4puIVe/gmfF5CAwQlFNo3Hp4eVP0613QXkaIzwSkfFlas0v kg4g== 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=t4YKe8PI/APTpoq9R2skXAv8xWrHif4se99u244LeJc=; b=Nka3+4DSx5s8yJNe/euHf1nuxkUEN88EfUvrAwXQWd8sdTKdfoeOgu8buXCsiC1pEh jBssK45Az7ZUQyHEVVuMwUuf3tNlIPFOBAYlsfOuqwVJroNemrSVaSlT5KMpU4NtdRp3 hj3TtLQIJtkHA3HPZdLcZXeM6+XlnrhEOy0J/cySyEiJPAOOigTvIl8jgRU6+p1ZsxkR nDKA79WtCvkZ1UzdnkeyqDzjvvo43SSsqCg6jQY8m1I+PArLgUBt/u1U2qdEy8RHUnhB d4U6B3X3prZOttPlsrTGguGWkblODyCdmFnFFQft/BFPVrurVqBj4m+UrLaUY/aOqE8n aNcA== X-Gm-Message-State: AOUpUlF6Dq9fwBF0rNvAEcviBkB9IF7bX9ATxmvk1fhFEQbmYWRcmv61 m+HHbah9TreR7n4SVZfch3tiLYSaJq9n73/4ypQ= X-Received: by 2002:aca:42:: with SMTP id 63-v6mr12496670oia.154.1532861522898; Sun, 29 Jul 2018 03:52:02 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:63d2:0:0:0:0:0 with HTTP; Sun, 29 Jul 2018 03:52:02 -0700 (PDT) In-Reply-To: <1532750217-8886-1-git-send-email-skannan@codeaurora.org> References: <1532750217-8886-1-git-send-email-skannan@codeaurora.org> From: "Rafael J. Wysocki" Date: Sun, 29 Jul 2018 12:52:02 +0200 X-Google-Sender-Auth: 5HdYuV8Q1APiPjBidqqM9hA5QjI Message-ID: Subject: Re: [PATCH] PM / devfreq: Generic cpufreq governor To: Saravana Kannan Cc: 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 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.