|
Lines 325-331
static struct attribute_group dbs_attr_group = {
Link Here
|
| 325 |
static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) |
325 |
static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) |
| 326 |
{ |
326 |
{ |
| 327 |
unsigned int idle_ticks, total_ticks; |
327 |
unsigned int idle_ticks, total_ticks; |
| 328 |
unsigned int load; |
328 |
unsigned int load = 0; |
| 329 |
cputime64_t cur_jiffies; |
329 |
cputime64_t cur_jiffies; |
| 330 |
|
330 |
|
| 331 |
struct cpufreq_policy *policy; |
331 |
struct cpufreq_policy *policy; |
|
Lines 370-376
static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
Link Here
|
| 370 |
if (tmp_idle_ticks < idle_ticks) |
370 |
if (tmp_idle_ticks < idle_ticks) |
| 371 |
idle_ticks = tmp_idle_ticks; |
371 |
idle_ticks = tmp_idle_ticks; |
| 372 |
} |
372 |
} |
| 373 |
load = (100 * (total_ticks - idle_ticks)) / total_ticks; |
373 |
if (likely(total_ticks > idle_ticks)) |
|
|
374 |
load = (100 * (total_ticks - idle_ticks)) / total_ticks; |
| 374 |
|
375 |
|
| 375 |
/* Check for frequency increase */ |
376 |
/* Check for frequency increase */ |
| 376 |
if (load > dbs_tuners_ins.up_threshold) { |
377 |
if (load > dbs_tuners_ins.up_threshold) { |