public inbox for cpufreq@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, linaro-dev@lists.linaro.org,
	robin.randhawa@arm.com, Steve.Bannister@arm.com,
	Liviu.Dudau@arm.com
Subject: Re: [PATCH 0/4] CPUFreq: Implement per policy instances of governors
Date: Mon, 4 Feb 2013 17:50:57 +0100	[thread overview]
Message-ID: <20130204165057.GH13909@pd.tnic> (raw)
In-Reply-To: <CAKohpokt0xtsj1eQDMw6JgvQVp4rgFyU-vUrtuuF+0jjOVNHRQ@mail.gmail.com>

On Mon, Feb 04, 2013 at 09:07:11PM +0530, Viresh Kumar wrote:
> I don't have board right now to take the snapshot, but it would be
> like:
> 
> $ tree /sys/devices/system/cpu/cpu0/cpufreq/
> /sys/devices/system/cpu/cpu0/cpufreq/
> ├── affected_cpus
> ├── bios_limit
> ├── cpb
> ├── cpuinfo_cur_freq
> ├── cpuinfo_max_freq
> ├── cpuinfo_min_freq
> ├── cpuinfo_transition_latency
> ├── related_cpus
> ├── scaling_available_frequencies
> ├── scaling_available_governors
> ├── scaling_cur_freq
> ├── scaling_driver
> ├── scaling_governor
> ├── scaling_max_freq
> ├── scaling_min_freq
> ├── scaling_setspeed
> └── stats
>     ├── time_in_state
>     ├── total_trans
>     └── trans_table
> └── ondemand
>     ├── sampling_rate
>     ├── up_threshold
>     └── ignore_nice

So this is adding the current governor as a per-cpu thing.

> > One thing I've come to realize with the current interface is that if
> > you want to change stuff, you need to iterate over all cpus instead of
> > writing to a system-wide node.
> 
> Not really. Following is the way by which cpu/cpu*/cpufreq directories
> are created:

That's not what I meant - I meant from userspace:

for $i in $(grep processor /proc/cpuinfo | awk '{ print $3 }');
do
	echo "performance" > /sys/devices/system/cpu/cpu$i/cpufreq/scaling_governor;
done

Instead of

echo "performance" > /sys/devices/system/cpu/cpufreq/scaling_governor

which is hypothetical but sets it for the whole system without fuss.

[ … ]

> I want to control it over clock-domain, but can't get that in cpu/cpufreq/.
> Policies don't have numbers assigned to them.

So, give them names.

> So, i am working on ARM's big.LITTLE system where we have two
> clusters. One of A15s and other of A7s. Because of their different
> power ratings or performance figures, we need to have separate set of
> ondemand tunables for them. And hence this patch. Though this patch is
> required for any multi-cluster system.

So you want this (values after "="):

cpu/cpufreq/
|-> policy0
    |-> name		= A15
    |-> min_freq	= ...
    |-> max_freq	= ...
    |-> affected_cpus	= 0,1,2,...
    |-> ondemand
        |-> sampling_rate
	|-> up_threshold
	|-> ignore_nice
    ...
|-> policy1
    |-> name		= A7
    |-> min_freq	= ...
    |-> max_freq	= ...
    |-> affected_cpus	= n,n+1,n+2,...
    |-> performance
        |-> sampling_rate
	|-> up_threshold
	|-> ignore_nice
    ...

Other arches create other policies and that's it. If you need another
policy added to the set, you simply add 'policyN++' and that's it.

I think this is cleaner but whatever - I don't care that much. My
only strong concern is that this thing should be a Kconfig option and
optional for arches where it doesn't apply.

Thanks.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

  reply	other threads:[~2013-02-04 16:50 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-04 11:38 [PATCH 0/4] CPUFreq: Implement per policy instances of governors Viresh Kumar
     [not found] ` <cover.1359976493.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-02-04 11:38   ` [PATCH 1/4] cpufreq: Don't check cpu_online(policy->cpu) Viresh Kumar
2013-02-04 11:38   ` [PATCH 2/4] cpufreq: stats: Get rid of CPUFREQ_STATDEVICE_ATTR Viresh Kumar
2013-02-04 11:38   ` [PATCH 3/4] cpufreq: Add per policy governor-init/exit infrastructure Viresh Kumar
2013-02-04 11:38   ` [PATCH 4/4] cpufreq: governor: Implement per policy instances of governors Viresh Kumar
2013-02-10 21:14     ` Francesco Lavra
2013-02-11  4:16       ` Viresh Kumar
2013-02-11  4:39         ` Viresh Kumar
2013-02-04 12:17   ` [PATCH 0/4] CPUFreq: " Rafael J. Wysocki
2013-02-04 12:24     ` Viresh Kumar
2013-02-04 12:32       ` Borislav Petkov
2013-02-04 12:54         ` Viresh Kumar
2013-02-04 13:04           ` Borislav Petkov
2013-02-04 13:25             ` Viresh Kumar
2013-02-04 13:36               ` Borislav Petkov
2013-02-04 13:58                 ` Viresh Kumar
2013-02-04 14:09                   ` Borislav Petkov
2013-02-04 14:21                     ` Viresh Kumar
2013-02-04 15:05                       ` Borislav Petkov
2013-02-04 15:37                         ` Viresh Kumar
2013-02-04 16:50                           ` Borislav Petkov [this message]
2013-02-05  7:20                             ` Viresh Kumar
2013-02-05  9:15                               ` Borislav Petkov
     [not found]                                 ` <20130205091532.GA4827-fF5Pk5pvG8Y@public.gmane.org>
2013-02-05  9:47                                   ` Viresh Kumar
2013-02-05 10:27                                     ` Borislav Petkov
2013-02-05 10:43                                       ` Viresh Kumar
2013-02-05 11:04                                         ` Borislav Petkov
2013-02-05 11:12                                           ` Viresh Kumar
2013-02-05 11:19                                             ` Borislav Petkov
2013-02-05 11:26                                               ` Viresh Kumar
2013-02-05 11:32                                                 ` Borislav Petkov
2013-02-05 12:24                                                   ` Viresh Kumar
2013-02-05 13:22                                                     ` Borislav Petkov
2013-02-05 13:55                                                       ` Viresh Kumar
2013-02-05  9:36                 ` Viresh Kumar
     [not found]                   ` <CAKohpokejWugM+wP5xcqp0F9AggLxuEf9Ox5fDViMxJh1c+kEw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-05 11:29                     ` Charles Garcia-Tobin
2013-02-05 11:39                       ` Borislav Petkov
2013-02-05 18:38                         ` Charles Garcia-Tobin
2013-02-05 18:44                           ` Borislav Petkov
2013-02-05 16:21 ` Viresh Kumar
2013-02-06  9:58   ` Viresh Kumar
2013-02-06 10:08     ` Amit Kucheria
2013-02-06 10:15       ` Viresh Kumar
2013-02-06 10:38         ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130204165057.GH13909@pd.tnic \
    --to=bp@alien8.de \
    --cc=Liviu.Dudau@arm.com \
    --cc=Steve.Bannister@arm.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=robin.randhawa@arm.com \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox