pass: gov: Fix wrong description and remove specific resource name 63/113963/3
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 9 Feb 2017 10:54:34 +0000 (19:54 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 10 Feb 2017 01:54:03 +0000 (10:54 +0900)
This patch justs fixes the wrong description and remove the specific
resource name to improve the readability of comments on a text.

Change-Id: I0356b210a97f7325e2d13f7d10e7eab1669f3288
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
src/pass/pass-gov.c

index 2edbbed..dc87db6 100644 (file)
@@ -117,26 +117,26 @@ static int pass_notifier_exit(struct pass_policy *policy)
  ****************************************************************************/
 
 /*
- * pass_hotplug_set_online - Change the maximum number of online cpu
+ * pass_hotplug_set_online - Change the minimum number of online cpu
  *
  * @policy: the instance of struct pass_policy
- * @max_online: the maximum number of online cpu
+ * @min_num: the minimum number of online cpu
  */
 static void pass_hotplug_set_online(struct pass_policy *policy,
-                                       unsigned int online)
+                                       unsigned int min_num)
 {
        struct pass_resource *pass_res = to_pass_resource(policy);
        struct pass_hotplug *hotplug = policy->hotplug;
        int i;
 
-       if (!hotplug || online == hotplug->online)
+       if (!hotplug || min_num == hotplug->online)
                return;
 
-       if (online > hotplug->max_online)
-               online = hotplug->max_online;
+       if (min_num > hotplug->max_online)
+               min_num = hotplug->max_online;
 
        for (i = 0 ; i < policy->freq.num_nr_cpus; i++) {
-               if (i < online) {
+               if (i < min_num) {
                        pass_set_online_state(pass_res, hotplug->sequence[i],
                                                PASS_CPU_UP);
                } else {
@@ -147,11 +147,11 @@ static void pass_hotplug_set_online(struct pass_policy *policy,
 
        /*
        _I("- CPU %4s '%d->%d'Core\n",
-               (hotplug->online > online ? "DOWN" : "UP"),
-               hotplug->online, online);
+               (hotplug->online > min_num ? "DOWN" : "UP"),
+               hotplug->online, min_num);
        */
 
-       hotplug->online = online;
+       hotplug->online = min_num;
 }
 
 /*
@@ -213,10 +213,10 @@ struct pass_hotplug* pass_get_hotplug(struct pass_policy *policy,
  ****************************************************************************/
 
 /*
- * pass_governor_change_level - Change maximum cpu frequency and number of online cpu
+ * pass_governor_change_level - Change frequency and number of online resources
  *
  * @policy: the instance of struct pass_policy
- * @level: the pass level
+ * @new_level: the desired pass level
  */
 static int pass_governor_change_level(struct pass_policy *policy, int new_level)
 {
@@ -380,9 +380,9 @@ static Eina_Bool pass_governor_core_timer(void *data)
 
        /*
         * Collect data related to system state
-        * - current cpu frequency
+        * - the current frequency
         * - the number of nr_running
-        * - cpu load (= runnable_avg_sum * 100 / runnable_avg_period)
+        * - the resource utilization
         */
        ret = pass_get_cpu_stats(policy);
        if (ret < 0) {
@@ -502,7 +502,7 @@ static void __pass_governor_stop(struct pass_policy *policy)
                return;
        }
 
-       /* Restore maximum cpu freq/the number of online cpu */
+       /* Restore the frequency and the number of online resources */
        pass_governor_change_level(policy, policy->num_levels - 1);
 
        pass_hotplug_stop(policy);
@@ -551,8 +551,8 @@ static int __pass_governor_exit(struct pass_policy *policy)
        pass_notifier_exit(policy);
 
        /*
-        * Stop core timer and
-        * Restore maximum online cpu/cpu frequency
+        * Stop timer and
+        * Restore the frequency and the number of online resources
         */
        pass_governor_update(policy, PASS_GOV_STOP);
 
@@ -614,11 +614,11 @@ static int __pass_governor_update(struct pass_policy *policy,
 }
 
 /*
- * pass_governor_change_level_scope - Change the scope of frequency scaling
+ * pass_governor_change_level_scope - Change the scope of pass level
  *
  * @policy: the instance of struct pass_policy
- * @min_level: the minimum level of frequency scaling
- * @max_level: the maximum level of frequency scaling
+ * @min_level: the minimum pass level
+ * @max_level: the maximum pass level
  */
 int pass_governor_change_level_scope(struct pass_policy *policy,
                                            int min_level, int max_level)
@@ -636,7 +636,7 @@ int pass_governor_change_level_scope(struct pass_policy *policy,
                && max_level == policy->max_level)
                return 0;
 
-       /* Change minimum/maximum level of frequency scaling */
+       /* Change minimum/maximum pass level */
        policy->min_level = min_level;
        policy->max_level = max_level;