LINUX.ORG.RU
ФорумTalks

[kernel, android] cpufreq: new 'interactive' governor


0

0

http://github.com/CyanogenMod/cm-kernel/commit/255f13bf41f368aa51638a854ed69cfc60f39120

cpufreq: interactive: New 'interactive' governor

New interactive governor.

This governor is designed for latency sensitive workloads, UI interaction for
example.

Advantages:
+ significantly more responsive to ramp cpu up when required (UI interaction)
+ more consistent ramping, existing governors do their cpu load sampling in a
workqueue context, the 'interactive' governor does this in a timer context, 
which
gives more consistent cpu load sampling.
+ higher priority for cpu frequency increase, rt_workqueue is used for scaling
up, giving the remaining tasks the cpu performance benefit, unlike existing
governors which schedule rampup work to occur after your performance starved
tasks have completed.

Existing governors sample cpu load at a particular rate, typically
every X ms. Which can lead to under powering UI threads when the user has
interacted with an idle system until the next sample period happns.

The 'interactive' governor has a different approach. Instead of sampling the cpu

at a specified rate, the governor will scale the cpu frequency up when coming
out of idle. When the cpu comes out of idle, a timer is configured to fire
within 1-2 ticks. If the cpu is 100% busy from exiting idle to when the timer
fires then we assume the cpu is underpowered and ramp to MAX speed.

If the cpu was not 100% busy, then the governor evaluates the cpu load over the
last 'min_sample_rate' (default 50000 uS) to determine the cpu speed to ramp 
down
to.

There is only one tuneable for this governor:
/sys/devices/system/cpu/cpufreq/interactive/min_sample_rate:
  The minimum ammount of time to spend at the current frequency before
  ramping down. This is to ensure that the governor has seen enough
  historic cpu load data to determine the appropriate workload.
  Default is 5000 uS.

Signed-off-by: Mike Chan <mike@android.com>
Change-Id: I686d2f57b0ed9cbb73217403b7438be5719588d2
Как считаете, применим ли этот регулятор частоты за пределами ведроида, т.е. на обычных компьютерах?

P.S. Никто не знает, есть ли где-нибудь сторонняя web-смотрелка для git-репозиториев Android'а? А то http://android.git.kernel.org/ походу переглючило. Так что даю ссылку на коммит в CyanogenMod, а не на первоисточник.

Deleted

Ответ на: комментарий от roman77

Чем оно лучше ondemand?

Ты настолько Ъ, что не только не пошёл по ссылке, но и даже цитату не прочитал?

Deleted
()
Ответ на: комментарий от Deleted

Да, я Ъ^2. Английский мне не особо дается, а инет через могильник не дает возможности перевести где либо

roman77 ★★★★★
()
Ответ на: комментарий от roman77

Коротко: быстрее реагирует на рост нагрузки на ЦПУ, сразу поднимет частоту если процессор был в idle состоянии, если ЦПУ загружен на 100% поднимает ее еще раз.

goose
()

Чёт на 2.6.34 не сконпелялость.

anon_666
()
Ответ на: комментарий от tux2002

Мне пока хватает conservative.


conservative - поднимает частоту постепенно при нагрузке
ondemand - сразу на максимум и потом сбрасывает постепенно

conservative выставлен на нотике, ondemand - на десктопе

anTaRes ★★★★
()

>Как считаете

Сейчас попробую прикрутить к zen-kernel и потестить.
имхо, должен быть быстрее, но больше будет жрать батарею.

devl547 ★★★★★
()
Ответ на: комментарий от anTaRes

Я таких тонкостей не знал. По мануалам понял что похожи, при выборе руководствоввлся названием :)

tux2002
()
Ответ на: комментарий от devl547

не собралось :(

drivers/cpufreq/cpufreq_interactive.c: In function ‘cpufreq_interactive_freq_change_time_work’:
drivers/cpufreq/cpufreq_interactive.c:185: error: incompatible type for argument 2 of ‘cpumask_next’
include/linux/cpumask.h:169: note: expected ‘const struct cpumask *’ but argument is of type ‘cpumask_t’
drivers/cpufreq/cpufreq_interactive.c:185: warning: left-hand operand of comma expression has no effect

devl547 ★★★★★
()
Ответ на: комментарий от Led

Ну, и это:

--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2910,6 +2910,7 @@ unsigned long nr_running(void)

   return sum;
}
+EXPORT_SYMBOL_GPL(nr_running);

Led ★★★☆☆
()
Ответ на: комментарий от anTaRes

ondemand - сразу на максимум и потом сбрасывает постепенно

4.2, сразу на максимум не поднимает.

roman77 ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.