This patch adds a gov_timeout entry to the Level section in the resource
configuration file. Comparing with pass_gov_timeout in the Pass section,
this entry indicates the timer interval for a specific level. If this
entry does not appear in the Level section, the value of
pass_gov_timeout will be assigned to the governor timer interval for
that level by default.
Change-Id: I57ed24f8666711c11c3ceeeeaab9bfcc13c550a1
Signed-off-by: Wook Song <wook16.song@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
policy->pass_table[level].right_cond[0].nr_running = atoi(result->value);
else if (MATCH(result->name, "num_right_cond_busy_cpu"))
policy->pass_table[level].right_cond[0].busy_cpu = atoi(result->value);
+ else if (MATCH(result->name, "gov_timeout")) {
+ double gov_timeout = atof(result->value);
+
+ if (gov_timeout < PASS_MIN_GOV_TIMEOUT)
+ gov_timeout = PASS_MIN_GOV_TIMEOUT;
+
+ policy->pass_table[level].gov_timeout = gov_timeout;
+ }
return 0;
}
max_freq = policy->pass_table[i].limit_max_freq;
if (max_cpu < policy->pass_table[i].limit_min_cpu)
max_cpu = policy->pass_table[i].limit_min_cpu;
+ if (policy->pass_table[i].gov_timeout == 0)
+ policy->pass_table[i].gov_timeout = policy->gov_timeout;
}
policy->freq.max_freq = max_freq;