<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/cpufreq, branch v2.6.28.9</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>[CPUFREQ] Fix BUG: using smp_processor_id() in preemptible code</title>
<updated>2008-10-09T17:52:44+00:00</updated>
<author>
<name>Andrea Righi</name>
<email>righi.andrea@gmail.com</email>
</author>
<published>2008-09-18T10:43:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4f6e6b9f97b0ce98a8d1da65adbaf743bd0486a9'/>
<id>4f6e6b9f97b0ce98a8d1da65adbaf743bd0486a9</id>
<content type='text'>
Use get_cpu()/put_cpu() in cpufreq_ondemand init routine, instead of
smp_processor_id() to avoid the following BUG:

[   35.313118] BUG: using smp_processor_id() in preemptible [00000000] code=: modprobe/4952
[   35.313132] caller is cpufreq_gov_dbs_init+0xa/0x8f [cpufreq_ondemand]
[   35.313140] Pid: 4952, comm: modprobe Not tainted 2.6.27-rc5-mm1 #23
[   35.313145] Call Trace:
[   35.313158]  [&lt;ffffffff80361ff7&gt;] debug_smp_processor_id+0xd7/0xe0
[   35.313167]  [&lt;ffffffffa010800a&gt;] cpufreq_gov_dbs_init+0xa/0x8f [cpufreq_ondemand]
[   35.313176]  [&lt;ffffffff8020903b&gt;] _stext+0x3b/0x160
[   35.313185]  [&lt;ffffffff804768c5&gt;] __mutex_unlock_slowpath+0xe5/0x190
[   35.313195]  [&lt;ffffffff8026236a&gt;] trace_hardirqs_on_caller+0xca/0x140
[   35.313205]  [&lt;ffffffff8026ef4c&gt;] sys_init_module+0xdc/0x210
[   35.313212]  [&lt;ffffffff8020b7cb&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: Andrea Righi &lt;righi.andrea@gmail.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use get_cpu()/put_cpu() in cpufreq_ondemand init routine, instead of
smp_processor_id() to avoid the following BUG:

[   35.313118] BUG: using smp_processor_id() in preemptible [00000000] code=: modprobe/4952
[   35.313132] caller is cpufreq_gov_dbs_init+0xa/0x8f [cpufreq_ondemand]
[   35.313140] Pid: 4952, comm: modprobe Not tainted 2.6.27-rc5-mm1 #23
[   35.313145] Call Trace:
[   35.313158]  [&lt;ffffffff80361ff7&gt;] debug_smp_processor_id+0xd7/0xe0
[   35.313167]  [&lt;ffffffffa010800a&gt;] cpufreq_gov_dbs_init+0xa/0x8f [cpufreq_ondemand]
[   35.313176]  [&lt;ffffffff8020903b&gt;] _stext+0x3b/0x160
[   35.313185]  [&lt;ffffffff804768c5&gt;] __mutex_unlock_slowpath+0xe5/0x190
[   35.313195]  [&lt;ffffffff8026236a&gt;] trace_hardirqs_on_caller+0xca/0x140
[   35.313205]  [&lt;ffffffff8026ef4c&gt;] sys_init_module+0xdc/0x210
[   35.313212]  [&lt;ffffffff8020b7cb&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: Andrea Righi &lt;righi.andrea@gmail.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CPUFREQ] Don't export governors for default governor</title>
<updated>2008-10-09T17:52:44+00:00</updated>
<author>
<name>Sven Wegener</name>
<email>sven.wegener@stealer.net</email>
</author>
<published>2008-09-20T14:50:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c4d14bc0bb5d13e316890651ae4518b764c3344c'/>
<id>c4d14bc0bb5d13e316890651ae4518b764c3344c</id>
<content type='text'>
We don't need to export the governors for use as the default governor,
because the default governor will be built-in anyway and we can access
the symbol directly.

This also fixes the following sparse warnings:

drivers/cpufreq/cpufreq_conservative.c:578:25: warning: symbol 'cpufreq_gov_conservative' was not declared. Should it be static?
drivers/cpufreq/cpufreq_ondemand.c:582:25: warning: symbol 'cpufreq_gov_ondemand' was not declared. Should it be static?
drivers/cpufreq/cpufreq_performance.c:39:25: warning: symbol 'cpufreq_gov_performance' was not declared. Should it be static?
drivers/cpufreq/cpufreq_powersave.c:38:25: warning: symbol 'cpufreq_gov_powersave' was not declared. Should it be static?
drivers/cpufreq/cpufreq_userspace.c:190:25: warning: symbol 'cpufreq_gov_userspace' was not declared. Should it be static?

Signed-off-by: Sven Wegener &lt;sven.wegener@stealer.net&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't need to export the governors for use as the default governor,
because the default governor will be built-in anyway and we can access
the symbol directly.

This also fixes the following sparse warnings:

drivers/cpufreq/cpufreq_conservative.c:578:25: warning: symbol 'cpufreq_gov_conservative' was not declared. Should it be static?
drivers/cpufreq/cpufreq_ondemand.c:582:25: warning: symbol 'cpufreq_gov_ondemand' was not declared. Should it be static?
drivers/cpufreq/cpufreq_performance.c:39:25: warning: symbol 'cpufreq_gov_performance' was not declared. Should it be static?
drivers/cpufreq/cpufreq_powersave.c:38:25: warning: symbol 'cpufreq_gov_powersave' was not declared. Should it be static?
drivers/cpufreq/cpufreq_userspace.c:190:25: warning: symbol 'cpufreq_gov_userspace' was not declared. Should it be static?

Signed-off-by: Sven Wegener &lt;sven.wegener@stealer.net&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CPUFREQ][6/6] cpufreq: Add idle microaccounting in ondemand governor</title>
<updated>2008-10-09T17:52:44+00:00</updated>
<author>
<name>venkatesh.pallipadi@intel.com</name>
<email>venkatesh.pallipadi@intel.com</email>
</author>
<published>2008-08-04T18:59:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=808009131046b62ac434dbc796c0fe8accaab415'/>
<id>808009131046b62ac434dbc796c0fe8accaab415</id>
<content type='text'>
Use get_cpu_idle_time_us() to get micro-accounted idle information.
This enables ondemand to get more accurate idle and busy timings
than the jiffy based calculation. As a result, we can decrease
the ondemand safety gaurd band from 80-10 to 95-3.

Results in more aggressive power savings.

Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use get_cpu_idle_time_us() to get micro-accounted idle information.
This enables ondemand to get more accurate idle and busy timings
than the jiffy based calculation. As a result, we can decrease
the ondemand safety gaurd band from 80-10 to 95-3.

Results in more aggressive power savings.

Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CPUFREQ][4/6] cpufreq_ondemand: Parameterize down differential</title>
<updated>2008-10-09T17:52:44+00:00</updated>
<author>
<name>venkatesh.pallipadi@intel.com</name>
<email>venkatesh.pallipadi@intel.com</email>
</author>
<published>2008-08-04T18:59:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e9d95bf7eb929b9ddc9af9f4327b76c77ed4c7d6'/>
<id>e9d95bf7eb929b9ddc9af9f4327b76c77ed4c7d6</id>
<content type='text'>
Use a parameter for down differential, instead of hardcoded 10%. Follow-on
patch changes the down-differential dynamically, based on whether
we are using idle micro-accounting or not.

Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use a parameter for down differential, instead of hardcoded 10%. Follow-on
patch changes the down-differential dynamically, based on whether
we are using idle micro-accounting or not.

Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CPUFREQ][3/6] cpufreq: get_cpu_idle_time() changes in ondemand for idle-microaccounting</title>
<updated>2008-10-09T17:52:44+00:00</updated>
<author>
<name>venkatesh.pallipadi@intel.com</name>
<email>venkatesh.pallipadi@intel.com</email>
</author>
<published>2008-08-04T18:59:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3430502d356284ff4f7782d75bb01a402fd3d45e'/>
<id>3430502d356284ff4f7782d75bb01a402fd3d45e</id>
<content type='text'>
Preparatory changes for doing idle micro-accounting in ondemand governor.
get_cpu_idle_time() gets extra parameter and returns idle time and also the
wall time that corresponds to the idle time measurement.

Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Preparatory changes for doing idle micro-accounting in ondemand governor.
get_cpu_idle_time() gets extra parameter and returns idle time and also the
wall time that corresponds to the idle time measurement.

Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CPUFREQ][2/6] cpufreq: Change load calculation in ondemand for software coordination</title>
<updated>2008-10-09T17:52:43+00:00</updated>
<author>
<name>venkatesh.pallipadi@intel.com</name>
<email>venkatesh.pallipadi@intel.com</email>
</author>
<published>2008-08-04T18:59:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c43aa3bd99a67009a167430e80c5fde6f37288d8'/>
<id>c43aa3bd99a67009a167430e80c5fde6f37288d8</id>
<content type='text'>
Change the load calculation algorithm in ondemand to work well with software
coordination of frequency across the dependent cpus.

Multiply individual CPU utilization with the average freq of that logical CPU
during the measurement interval (using getavg call). And find the max CPU
utilization number in terms of CPU freq. That number is then used to
get to the target freq for next sampling interval.

Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change the load calculation algorithm in ondemand to work well with software
coordination of frequency across the dependent cpus.

Multiply individual CPU utilization with the average freq of that logical CPU
during the measurement interval (using getavg call). And find the max CPU
utilization number in terms of CPU freq. That number is then used to
get to the target freq for next sampling interval.

Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CPUFREQ][1/6] cpufreq: Add cpu number parameter to __cpufreq_driver_getavg()</title>
<updated>2008-10-09T17:52:43+00:00</updated>
<author>
<name>venkatesh.pallipadi@intel.com</name>
<email>venkatesh.pallipadi@intel.com</email>
</author>
<published>2008-08-04T18:59:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bf0b90e357c883e8efd72954432efe652de74c76'/>
<id>bf0b90e357c883e8efd72954432efe652de74c76</id>
<content type='text'>
Add a cpu parameter to __cpufreq_driver_getavg(). This is needed for software
cpufreq coordination where policy-&gt;cpu may not be same as the CPU on which we
want to getavg frequency.

A follow-on patch will use this parameter to getavg freq from all cpus
in policy-&gt;cpus.

Change since last patch. Fix the offline/online and suspend/resume
oops reported by Youquan Song &lt;youquan.song@intel.com&gt;

Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a cpu parameter to __cpufreq_driver_getavg(). This is needed for software
cpufreq coordination where policy-&gt;cpu may not be same as the CPU on which we
want to getavg frequency.

A follow-on patch will use this parameter to getavg freq from all cpus
in policy-&gt;cpus.

Change since last patch. Fix the offline/online and suspend/resume
oops reported by Youquan Song &lt;youquan.song@intel.com&gt;

Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CPUFREQ] use deferrable delayed work init in conservative governor</title>
<updated>2008-10-09T17:52:43+00:00</updated>
<author>
<name>Ben Slusky</name>
<email>sluskyb@paranoiacs.org</email>
</author>
<published>2008-07-07T17:16:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8217e4f4c93e5fb59bb3cd1e6135213889349f86'/>
<id>8217e4f4c93e5fb59bb3cd1e6135213889349f86</id>
<content type='text'>
Venki Pallipadi made a similar change to the ondemand governor a while
back (in commit 28287033e12463c8ff89f1ea8038783d0360391c). It seems to
work just as well in the conservative governor, leading to fewer wakeups
as reported by powertop.

Signed-off-by: Ben Slusky &lt;sluskyb@paranoiacs.org&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Venki Pallipadi made a similar change to the ondemand governor a while
back (in commit 28287033e12463c8ff89f1ea8038783d0360391c). It seems to
work just as well in the conservative governor, leading to fewer wakeups
as reported by powertop.

Signed-off-by: Ben Slusky &lt;sluskyb@paranoiacs.org&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CPUFREQ] drivers/cpufreq/cpufreq.c: Adjust error handling code involving cpufreq_cpu_put</title>
<updated>2008-10-09T17:52:43+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>julia@diku.dk</email>
</author>
<published>2008-07-25T20:44:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f1829e4a371f26430185a9d5b97b8d9d19824e08'/>
<id>f1829e4a371f26430185a9d5b97b8d9d19824e08</id>
<content type='text'>
After calling cpufreq_cpu_get, error handling code should call
cpufreq_cpu_put.

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// &lt;smpl&gt;
@r@
expression x,E;
statement S;
position p1,p2,p3;
@@

(
if ((x = cpufreq_cpu_get@p1(...)) == NULL || ...) S
|
x = cpufreq_cpu_get@p1(...)
... when != x
if (x == NULL || ...) S
)
&lt;...
if@p3 (...) { ... when != cpufreq_cpu_put(x)
                  when != if (x) { ... cpufreq_cpu_put(x); ...}
    return@p2 ...;
}
...&gt;
(
return x;
|
return 0;
|
x = E
|
E = x
|
cpufreq_cpu_put(x)
)

@exists@
position r.p1,r.p2,r.p3;
expression x;
int ret != 0;
statement S;
@@

* x = cpufreq_cpu_get@p1(...)
  &lt;...
* if@p3 (...)
  S
  ...&gt;
* return@p2 \(NULL\|ret\);
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After calling cpufreq_cpu_get, error handling code should call
cpufreq_cpu_put.

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// &lt;smpl&gt;
@r@
expression x,E;
statement S;
position p1,p2,p3;
@@

(
if ((x = cpufreq_cpu_get@p1(...)) == NULL || ...) S
|
x = cpufreq_cpu_get@p1(...)
... when != x
if (x == NULL || ...) S
)
&lt;...
if@p3 (...) { ... when != cpufreq_cpu_put(x)
                  when != if (x) { ... cpufreq_cpu_put(x); ...}
    return@p2 ...;
}
...&gt;
(
return x;
|
return 0;
|
x = E
|
E = x
|
cpufreq_cpu_put(x)
)

@exists@
position r.p1,r.p2,r.p3;
expression x;
int ret != 0;
statement S;
@@

* x = cpufreq_cpu_get@p1(...)
  &lt;...
* if@p3 (...)
  S
  ...&gt;
* return@p2 \(NULL\|ret\);
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CPUFREQ] add error handling for cpufreq_register_governor() error</title>
<updated>2008-10-09T17:52:43+00:00</updated>
<author>
<name>Akinobu Mita</name>
<email>akinobu.mita@gmail.com</email>
</author>
<published>2008-07-14T03:00:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=888a794cacd8950ac6be701db20b62a4ab2ce90c'/>
<id>888a794cacd8950ac6be701db20b62a4ab2ce90c</id>
<content type='text'>
Add error handling for cpufreq_register_governor() error

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Cc: cpufreq@lists.linux.org.uk
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add error handling for cpufreq_register_governor() error

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Cc: cpufreq@lists.linux.org.uk
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
