cpufreq_conservative.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  1. /*
  2. * drivers/cpufreq/cpufreq_conservative.c
  3. *
  4. * Copyright (C) 2001 Russell King
  5. * (C) 2003 Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>.
  6. * Jun Nakajima <jun.nakajima@intel.com>
  7. * (C) 2004 Alexander Clouter <alex-kernel@digriz.org.uk>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. */
  13. #include <linux/kernel.h>
  14. #include <linux/module.h>
  15. #include <linux/smp.h>
  16. #include <linux/init.h>
  17. #include <linux/interrupt.h>
  18. #include <linux/ctype.h>
  19. #include <linux/cpufreq.h>
  20. #include <linux/sysctl.h>
  21. #include <linux/types.h>
  22. #include <linux/fs.h>
  23. #include <linux/sysfs.h>
  24. #include <linux/cpu.h>
  25. #include <linux/kmod.h>
  26. #include <linux/workqueue.h>
  27. #include <linux/jiffies.h>
  28. #include <linux/kernel_stat.h>
  29. #include <linux/percpu.h>
  30. #include <linux/mutex.h>
  31. /*
  32. * dbs is used in this file as a shortform for demandbased switching
  33. * It helps to keep variable names smaller, simpler
  34. */
  35. #define DEF_FREQUENCY_UP_THRESHOLD (80)
  36. #define DEF_FREQUENCY_DOWN_THRESHOLD (20)
  37. /*
  38. * The polling frequency of this governor depends on the capability of
  39. * the processor. Default polling frequency is 1000 times the transition
  40. * latency of the processor. The governor will work on any processor with
  41. * transition latency <= 10mS, using appropriate sampling
  42. * rate.
  43. * For CPUs with transition latency > 10mS (mostly drivers
  44. * with CPUFREQ_ETERNAL), this governor will not work.
  45. * All times here are in uS.
  46. */
  47. static unsigned int def_sampling_rate;
  48. #define MIN_SAMPLING_RATE_RATIO (2)
  49. /* for correct statistics, we need at least 10 ticks between each measure */
  50. #define MIN_STAT_SAMPLING_RATE \
  51. (MIN_SAMPLING_RATE_RATIO * jiffies_to_usecs(10))
  52. #define MIN_SAMPLING_RATE \
  53. (def_sampling_rate / MIN_SAMPLING_RATE_RATIO)
  54. /* Above MIN_SAMPLING_RATE will vanish with its sysfs file soon
  55. * Define the minimal settable sampling rate to the greater of:
  56. * - "HW transition latency" * 100 (same as default sampling / 10)
  57. * - MIN_STAT_SAMPLING_RATE
  58. * To avoid that userspace shoots itself.
  59. */
  60. static unsigned int minimum_sampling_rate(void)
  61. {
  62. return max(def_sampling_rate / 10, MIN_STAT_SAMPLING_RATE);
  63. }
  64. /* This will also vanish soon with removing sampling_rate_max */
  65. #define MAX_SAMPLING_RATE (500 * def_sampling_rate)
  66. #define LATENCY_MULTIPLIER (1000)
  67. #define DEF_SAMPLING_DOWN_FACTOR (1)
  68. #define MAX_SAMPLING_DOWN_FACTOR (10)
  69. #define TRANSITION_LATENCY_LIMIT (10 * 1000 * 1000)
  70. static void do_dbs_timer(struct work_struct *work);
  71. struct cpu_dbs_info_s {
  72. struct cpufreq_policy *cur_policy;
  73. unsigned int prev_cpu_idle_up;
  74. unsigned int prev_cpu_idle_down;
  75. unsigned int enable;
  76. unsigned int down_skip;
  77. unsigned int requested_freq;
  78. };
  79. static DEFINE_PER_CPU(struct cpu_dbs_info_s, cpu_dbs_info);
  80. static unsigned int dbs_enable; /* number of CPUs using this policy */
  81. /*
  82. * DEADLOCK ALERT! There is a ordering requirement between cpu_hotplug
  83. * lock and dbs_mutex. cpu_hotplug lock should always be held before
  84. * dbs_mutex. If any function that can potentially take cpu_hotplug lock
  85. * (like __cpufreq_driver_target()) is being called with dbs_mutex taken, then
  86. * cpu_hotplug lock should be taken before that. Note that cpu_hotplug lock
  87. * is recursive for the same process. -Venki
  88. */
  89. static DEFINE_MUTEX(dbs_mutex);
  90. static DECLARE_DELAYED_WORK(dbs_work, do_dbs_timer);
  91. struct dbs_tuners {
  92. unsigned int sampling_rate;
  93. unsigned int sampling_down_factor;
  94. unsigned int up_threshold;
  95. unsigned int down_threshold;
  96. unsigned int ignore_nice;
  97. unsigned int freq_step;
  98. };
  99. static struct dbs_tuners dbs_tuners_ins = {
  100. .up_threshold = DEF_FREQUENCY_UP_THRESHOLD,
  101. .down_threshold = DEF_FREQUENCY_DOWN_THRESHOLD,
  102. .sampling_down_factor = DEF_SAMPLING_DOWN_FACTOR,
  103. .ignore_nice = 0,
  104. .freq_step = 5,
  105. };
  106. static inline unsigned int get_cpu_idle_time(unsigned int cpu)
  107. {
  108. unsigned int add_nice = 0, ret;
  109. if (dbs_tuners_ins.ignore_nice)
  110. add_nice = kstat_cpu(cpu).cpustat.nice;
  111. ret = kstat_cpu(cpu).cpustat.idle +
  112. kstat_cpu(cpu).cpustat.iowait +
  113. add_nice;
  114. return ret;
  115. }
  116. /* keep track of frequency transitions */
  117. static int
  118. dbs_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
  119. void *data)
  120. {
  121. struct cpufreq_freqs *freq = data;
  122. struct cpu_dbs_info_s *this_dbs_info = &per_cpu(cpu_dbs_info,
  123. freq->cpu);
  124. if (!this_dbs_info->enable)
  125. return 0;
  126. this_dbs_info->requested_freq = freq->new;
  127. return 0;
  128. }
  129. static struct notifier_block dbs_cpufreq_notifier_block = {
  130. .notifier_call = dbs_cpufreq_notifier
  131. };
  132. /************************** sysfs interface ************************/
  133. static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf)
  134. {
  135. static int print_once;
  136. if (!print_once) {
  137. printk(KERN_INFO "CPUFREQ: conservative sampling_rate_max "
  138. "sysfs file is deprecated - used by: %s\n",
  139. current->comm);
  140. print_once = 1;
  141. }
  142. return sprintf(buf, "%u\n", MAX_SAMPLING_RATE);
  143. }
  144. static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf)
  145. {
  146. static int print_once;
  147. if (!print_once) {
  148. printk(KERN_INFO "CPUFREQ: conservative sampling_rate_max "
  149. "sysfs file is deprecated - used by: %s\n", current->comm);
  150. print_once = 1;
  151. }
  152. return sprintf(buf, "%u\n", MIN_SAMPLING_RATE);
  153. }
  154. #define define_one_ro(_name) \
  155. static struct freq_attr _name = \
  156. __ATTR(_name, 0444, show_##_name, NULL)
  157. define_one_ro(sampling_rate_max);
  158. define_one_ro(sampling_rate_min);
  159. /* cpufreq_conservative Governor Tunables */
  160. #define show_one(file_name, object) \
  161. static ssize_t show_##file_name \
  162. (struct cpufreq_policy *unused, char *buf) \
  163. { \
  164. return sprintf(buf, "%u\n", dbs_tuners_ins.object); \
  165. }
  166. show_one(sampling_rate, sampling_rate);
  167. show_one(sampling_down_factor, sampling_down_factor);
  168. show_one(up_threshold, up_threshold);
  169. show_one(down_threshold, down_threshold);
  170. show_one(ignore_nice_load, ignore_nice);
  171. show_one(freq_step, freq_step);
  172. static ssize_t store_sampling_down_factor(struct cpufreq_policy *unused,
  173. const char *buf, size_t count)
  174. {
  175. unsigned int input;
  176. int ret;
  177. ret = sscanf(buf, "%u", &input);
  178. if (ret != 1 || input > MAX_SAMPLING_DOWN_FACTOR || input < 1)
  179. return -EINVAL;
  180. mutex_lock(&dbs_mutex);
  181. dbs_tuners_ins.sampling_down_factor = input;
  182. mutex_unlock(&dbs_mutex);
  183. return count;
  184. }
  185. static ssize_t store_sampling_rate(struct cpufreq_policy *unused,
  186. const char *buf, size_t count)
  187. {
  188. unsigned int input;
  189. int ret;
  190. ret = sscanf(buf, "%u", &input);
  191. mutex_lock(&dbs_mutex);
  192. if (ret != 1) {
  193. mutex_unlock(&dbs_mutex);
  194. return -EINVAL;
  195. }
  196. dbs_tuners_ins.sampling_rate = max(input, minimum_sampling_rate());
  197. mutex_unlock(&dbs_mutex);
  198. return count;
  199. }
  200. static ssize_t store_up_threshold(struct cpufreq_policy *unused,
  201. const char *buf, size_t count)
  202. {
  203. unsigned int input;
  204. int ret;
  205. ret = sscanf(buf, "%u", &input);
  206. mutex_lock(&dbs_mutex);
  207. if (ret != 1 || input > 100 ||
  208. input <= dbs_tuners_ins.down_threshold) {
  209. mutex_unlock(&dbs_mutex);
  210. return -EINVAL;
  211. }
  212. dbs_tuners_ins.up_threshold = input;
  213. mutex_unlock(&dbs_mutex);
  214. return count;
  215. }
  216. static ssize_t store_down_threshold(struct cpufreq_policy *unused,
  217. const char *buf, size_t count)
  218. {
  219. unsigned int input;
  220. int ret;
  221. ret = sscanf(buf, "%u", &input);
  222. mutex_lock(&dbs_mutex);
  223. if (ret != 1 || input > 100 || input >= dbs_tuners_ins.up_threshold) {
  224. mutex_unlock(&dbs_mutex);
  225. return -EINVAL;
  226. }
  227. dbs_tuners_ins.down_threshold = input;
  228. mutex_unlock(&dbs_mutex);
  229. return count;
  230. }
  231. static ssize_t store_ignore_nice_load(struct cpufreq_policy *policy,
  232. const char *buf, size_t count)
  233. {
  234. unsigned int input;
  235. int ret;
  236. unsigned int j;
  237. ret = sscanf(buf, "%u", &input);
  238. if (ret != 1)
  239. return -EINVAL;
  240. if (input > 1)
  241. input = 1;
  242. mutex_lock(&dbs_mutex);
  243. if (input == dbs_tuners_ins.ignore_nice) { /* nothing to do */
  244. mutex_unlock(&dbs_mutex);
  245. return count;
  246. }
  247. dbs_tuners_ins.ignore_nice = input;
  248. /* we need to re-evaluate prev_cpu_idle_up and prev_cpu_idle_down */
  249. for_each_online_cpu(j) {
  250. struct cpu_dbs_info_s *j_dbs_info;
  251. j_dbs_info = &per_cpu(cpu_dbs_info, j);
  252. j_dbs_info->prev_cpu_idle_up = get_cpu_idle_time(j);
  253. j_dbs_info->prev_cpu_idle_down = j_dbs_info->prev_cpu_idle_up;
  254. }
  255. mutex_unlock(&dbs_mutex);
  256. return count;
  257. }
  258. static ssize_t store_freq_step(struct cpufreq_policy *policy,
  259. const char *buf, size_t count)
  260. {
  261. unsigned int input;
  262. int ret;
  263. ret = sscanf(buf, "%u", &input);
  264. if (ret != 1)
  265. return -EINVAL;
  266. if (input > 100)
  267. input = 100;
  268. /* no need to test here if freq_step is zero as the user might actually
  269. * want this, they would be crazy though :) */
  270. mutex_lock(&dbs_mutex);
  271. dbs_tuners_ins.freq_step = input;
  272. mutex_unlock(&dbs_mutex);
  273. return count;
  274. }
  275. #define define_one_rw(_name) \
  276. static struct freq_attr _name = \
  277. __ATTR(_name, 0644, show_##_name, store_##_name)
  278. define_one_rw(sampling_rate);
  279. define_one_rw(sampling_down_factor);
  280. define_one_rw(up_threshold);
  281. define_one_rw(down_threshold);
  282. define_one_rw(ignore_nice_load);
  283. define_one_rw(freq_step);
  284. static struct attribute *dbs_attributes[] = {
  285. &sampling_rate_max.attr,
  286. &sampling_rate_min.attr,
  287. &sampling_rate.attr,
  288. &sampling_down_factor.attr,
  289. &up_threshold.attr,
  290. &down_threshold.attr,
  291. &ignore_nice_load.attr,
  292. &freq_step.attr,
  293. NULL
  294. };
  295. static struct attribute_group dbs_attr_group = {
  296. .attrs = dbs_attributes,
  297. .name = "conservative",
  298. };
  299. /************************** sysfs end ************************/
  300. static void dbs_check_cpu(int cpu)
  301. {
  302. unsigned int idle_ticks, up_idle_ticks, down_idle_ticks;
  303. unsigned int tmp_idle_ticks, total_idle_ticks;
  304. unsigned int freq_target;
  305. unsigned int freq_down_sampling_rate;
  306. struct cpu_dbs_info_s *this_dbs_info = &per_cpu(cpu_dbs_info, cpu);
  307. struct cpufreq_policy *policy;
  308. if (!this_dbs_info->enable)
  309. return;
  310. policy = this_dbs_info->cur_policy;
  311. /*
  312. * The default safe range is 20% to 80%
  313. * Every sampling_rate, we check
  314. * - If current idle time is less than 20%, then we try to
  315. * increase frequency
  316. * Every sampling_rate*sampling_down_factor, we check
  317. * - If current idle time is more than 80%, then we try to
  318. * decrease frequency
  319. *
  320. * Any frequency increase takes it to the maximum frequency.
  321. * Frequency reduction happens at minimum steps of
  322. * 5% (default) of max_frequency
  323. */
  324. /* Check for frequency increase */
  325. idle_ticks = UINT_MAX;
  326. /* Check for frequency increase */
  327. total_idle_ticks = get_cpu_idle_time(cpu);
  328. tmp_idle_ticks = total_idle_ticks -
  329. this_dbs_info->prev_cpu_idle_up;
  330. this_dbs_info->prev_cpu_idle_up = total_idle_ticks;
  331. if (tmp_idle_ticks < idle_ticks)
  332. idle_ticks = tmp_idle_ticks;
  333. /* Scale idle ticks by 100 and compare with up and down ticks */
  334. idle_ticks *= 100;
  335. up_idle_ticks = (100 - dbs_tuners_ins.up_threshold) *
  336. usecs_to_jiffies(dbs_tuners_ins.sampling_rate);
  337. if (idle_ticks < up_idle_ticks) {
  338. this_dbs_info->down_skip = 0;
  339. this_dbs_info->prev_cpu_idle_down =
  340. this_dbs_info->prev_cpu_idle_up;
  341. /* if we are already at full speed then break out early */
  342. if (this_dbs_info->requested_freq == policy->max)
  343. return;
  344. freq_target = (dbs_tuners_ins.freq_step * policy->max) / 100;
  345. /* max freq cannot be less than 100. But who knows.... */
  346. if (unlikely(freq_target == 0))
  347. freq_target = 5;
  348. this_dbs_info->requested_freq += freq_target;
  349. if (this_dbs_info->requested_freq > policy->max)
  350. this_dbs_info->requested_freq = policy->max;
  351. __cpufreq_driver_target(policy, this_dbs_info->requested_freq,
  352. CPUFREQ_RELATION_H);
  353. return;
  354. }
  355. /* Check for frequency decrease */
  356. this_dbs_info->down_skip++;
  357. if (this_dbs_info->down_skip < dbs_tuners_ins.sampling_down_factor)
  358. return;
  359. /* Check for frequency decrease */
  360. total_idle_ticks = this_dbs_info->prev_cpu_idle_up;
  361. tmp_idle_ticks = total_idle_ticks -
  362. this_dbs_info->prev_cpu_idle_down;
  363. this_dbs_info->prev_cpu_idle_down = total_idle_ticks;
  364. if (tmp_idle_ticks < idle_ticks)
  365. idle_ticks = tmp_idle_ticks;
  366. /* Scale idle ticks by 100 and compare with up and down ticks */
  367. idle_ticks *= 100;
  368. this_dbs_info->down_skip = 0;
  369. freq_down_sampling_rate = dbs_tuners_ins.sampling_rate *
  370. dbs_tuners_ins.sampling_down_factor;
  371. down_idle_ticks = (100 - dbs_tuners_ins.down_threshold) *
  372. usecs_to_jiffies(freq_down_sampling_rate);
  373. if (idle_ticks > down_idle_ticks) {
  374. /*
  375. * if we are already at the lowest speed then break out early
  376. * or if we 'cannot' reduce the speed as the user might want
  377. * freq_target to be zero
  378. */
  379. if (this_dbs_info->requested_freq == policy->min
  380. || dbs_tuners_ins.freq_step == 0)
  381. return;
  382. freq_target = (dbs_tuners_ins.freq_step * policy->max) / 100;
  383. /* max freq cannot be less than 100. But who knows.... */
  384. if (unlikely(freq_target == 0))
  385. freq_target = 5;
  386. this_dbs_info->requested_freq -= freq_target;
  387. if (this_dbs_info->requested_freq < policy->min)
  388. this_dbs_info->requested_freq = policy->min;
  389. __cpufreq_driver_target(policy, this_dbs_info->requested_freq,
  390. CPUFREQ_RELATION_H);
  391. return;
  392. }
  393. }
  394. static void do_dbs_timer(struct work_struct *work)
  395. {
  396. int i;
  397. mutex_lock(&dbs_mutex);
  398. for_each_online_cpu(i)
  399. dbs_check_cpu(i);
  400. schedule_delayed_work(&dbs_work,
  401. usecs_to_jiffies(dbs_tuners_ins.sampling_rate));
  402. mutex_unlock(&dbs_mutex);
  403. }
  404. static inline void dbs_timer_init(void)
  405. {
  406. init_timer_deferrable(&dbs_work.timer);
  407. schedule_delayed_work(&dbs_work,
  408. usecs_to_jiffies(dbs_tuners_ins.sampling_rate));
  409. return;
  410. }
  411. static inline void dbs_timer_exit(void)
  412. {
  413. cancel_delayed_work(&dbs_work);
  414. return;
  415. }
  416. static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
  417. unsigned int event)
  418. {
  419. unsigned int cpu = policy->cpu;
  420. struct cpu_dbs_info_s *this_dbs_info;
  421. unsigned int j;
  422. int rc;
  423. this_dbs_info = &per_cpu(cpu_dbs_info, cpu);
  424. switch (event) {
  425. case CPUFREQ_GOV_START:
  426. if ((!cpu_online(cpu)) || (!policy->cur))
  427. return -EINVAL;
  428. if (this_dbs_info->enable) /* Already enabled */
  429. break;
  430. mutex_lock(&dbs_mutex);
  431. rc = sysfs_create_group(&policy->kobj, &dbs_attr_group);
  432. if (rc) {
  433. mutex_unlock(&dbs_mutex);
  434. return rc;
  435. }
  436. for_each_cpu(j, policy->cpus) {
  437. struct cpu_dbs_info_s *j_dbs_info;
  438. j_dbs_info = &per_cpu(cpu_dbs_info, j);
  439. j_dbs_info->cur_policy = policy;
  440. j_dbs_info->prev_cpu_idle_up = get_cpu_idle_time(cpu);
  441. j_dbs_info->prev_cpu_idle_down
  442. = j_dbs_info->prev_cpu_idle_up;
  443. }
  444. this_dbs_info->enable = 1;
  445. this_dbs_info->down_skip = 0;
  446. this_dbs_info->requested_freq = policy->cur;
  447. dbs_enable++;
  448. /*
  449. * Start the timerschedule work, when this governor
  450. * is used for first time
  451. */
  452. if (dbs_enable == 1) {
  453. unsigned int latency;
  454. /* policy latency is in nS. Convert it to uS first */
  455. latency = policy->cpuinfo.transition_latency / 1000;
  456. if (latency == 0)
  457. latency = 1;
  458. def_sampling_rate =
  459. max(10 * latency * LATENCY_MULTIPLIER,
  460. MIN_STAT_SAMPLING_RATE);
  461. dbs_tuners_ins.sampling_rate = def_sampling_rate;
  462. dbs_timer_init();
  463. cpufreq_register_notifier(
  464. &dbs_cpufreq_notifier_block,
  465. CPUFREQ_TRANSITION_NOTIFIER);
  466. }
  467. mutex_unlock(&dbs_mutex);
  468. break;
  469. case CPUFREQ_GOV_STOP:
  470. mutex_lock(&dbs_mutex);
  471. this_dbs_info->enable = 0;
  472. sysfs_remove_group(&policy->kobj, &dbs_attr_group);
  473. dbs_enable--;
  474. /*
  475. * Stop the timerschedule work, when this governor
  476. * is used for first time
  477. */
  478. if (dbs_enable == 0) {
  479. dbs_timer_exit();
  480. cpufreq_unregister_notifier(
  481. &dbs_cpufreq_notifier_block,
  482. CPUFREQ_TRANSITION_NOTIFIER);
  483. }
  484. mutex_unlock(&dbs_mutex);
  485. break;
  486. case CPUFREQ_GOV_LIMITS:
  487. mutex_lock(&dbs_mutex);
  488. if (policy->max < this_dbs_info->cur_policy->cur)
  489. __cpufreq_driver_target(
  490. this_dbs_info->cur_policy,
  491. policy->max, CPUFREQ_RELATION_H);
  492. else if (policy->min > this_dbs_info->cur_policy->cur)
  493. __cpufreq_driver_target(
  494. this_dbs_info->cur_policy,
  495. policy->min, CPUFREQ_RELATION_L);
  496. mutex_unlock(&dbs_mutex);
  497. break;
  498. }
  499. return 0;
  500. }
  501. #ifndef CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
  502. static
  503. #endif
  504. struct cpufreq_governor cpufreq_gov_conservative = {
  505. .name = "conservative",
  506. .governor = cpufreq_governor_dbs,
  507. .max_transition_latency = TRANSITION_LATENCY_LIMIT,
  508. .owner = THIS_MODULE,
  509. };
  510. static int __init cpufreq_gov_dbs_init(void)
  511. {
  512. return cpufreq_register_governor(&cpufreq_gov_conservative);
  513. }
  514. static void __exit cpufreq_gov_dbs_exit(void)
  515. {
  516. /* Make sure that the scheduled work is indeed not running */
  517. flush_scheduled_work();
  518. cpufreq_unregister_governor(&cpufreq_gov_conservative);
  519. }
  520. MODULE_AUTHOR("Alexander Clouter <alex-kernel@digriz.org.uk>");
  521. MODULE_DESCRIPTION("'cpufreq_conservative' - A dynamic cpufreq governor for "
  522. "Low Latency Frequency Transition capable processors "
  523. "optimised for use in a battery environment");
  524. MODULE_LICENSE("GPL");
  525. #ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
  526. fs_initcall(cpufreq_gov_dbs_init);
  527. #else
  528. module_init(cpufreq_gov_dbs_init);
  529. #endif
  530. module_exit(cpufreq_gov_dbs_exit);