Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 59211
b: refs/heads/master
c: ea48761
h: refs/heads/master
i:
  59209: 676a48c
  59207: a1fe5e0
v: v3
  • Loading branch information
Venki Pallipadi authored and Dave Jones committed Jun 21, 2007
1 parent 4df17b2 commit 6b291ea
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0af99b13c9f323e658b4f1d69a1ccae7d6f3f80a
refs/heads/master: ea48761519bd40d7a881c587b5f3177664b2987e
25 changes: 18 additions & 7 deletions trunk/drivers/cpufreq/cpufreq_ondemand.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,25 @@ static struct dbs_tuners {

static inline cputime64_t get_cpu_idle_time(unsigned int cpu)
{
cputime64_t retval;
cputime64_t idle_time;
cputime64_t cur_jiffies;
cputime64_t busy_time;

retval = cputime64_add(kstat_cpu(cpu).cpustat.idle,
kstat_cpu(cpu).cpustat.iowait);
cur_jiffies = jiffies64_to_cputime64(get_jiffies_64());
busy_time = cputime64_add(kstat_cpu(cpu).cpustat.user,
kstat_cpu(cpu).cpustat.system);

if (dbs_tuners_ins.ignore_nice)
retval = cputime64_add(retval, kstat_cpu(cpu).cpustat.nice);
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.irq);
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.softirq);
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.steal);

return retval;
if (!dbs_tuners_ins.ignore_nice) {
busy_time = cputime64_add(busy_time,
kstat_cpu(cpu).cpustat.nice);
}

idle_time = cputime64_sub(cur_jiffies, busy_time);
return idle_time;
}

/*
Expand Down Expand Up @@ -339,7 +349,8 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
cur_jiffies = jiffies64_to_cputime64(get_jiffies_64());
total_ticks = (unsigned int) cputime64_sub(cur_jiffies,
this_dbs_info->prev_cpu_wall);
this_dbs_info->prev_cpu_wall = cur_jiffies;
this_dbs_info->prev_cpu_wall = get_jiffies_64();

if (!total_ticks)
return;
/*
Expand Down

0 comments on commit 6b291ea

Please sign in to comment.