[Bug 12310] NOHZ appears to cause ondemand to effectively ignore 'ignore_nice_load'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



http://bugzilla.kernel.org/show_bug.cgi?id=12310





------- Comment #1 from jimsantelmo@xxxxxxxxx  2008-12-28 15:05 -------
  As I expected, just making cpufreq_ondemand:get_cpu_idle_time()
unconditionally return get_cpu_idle_time_jiffy works fine with NOHZ enabled.I
should have commented out the call to get_cpu_idle_time() because 'wall' is a
pointer and the thing it points to is getting updated twice.

static inline cputime64_t get_cpu_idle_time(unsigned int cpu, cputime64_t
*wall)
{
        u64 idle_time = get_cpu_idle_time_us(cpu, wall);

        //JB    if (idle_time == -1ULL)
                return get_cpu_idle_time_jiffy(cpu, wall);

        if (dbs_tuners_ins.ignore_nice) { //Must be something broken in here...
                cputime64_t cur_nice;
                unsigned long cur_nice_jiffies;
                struct cpu_dbs_info_s *dbs_info;

                dbs_info = &per_cpu(cpu_dbs_info, cpu);
                cur_nice = cputime64_sub(kstat_cpu(cpu).cpustat.nice,
                                         dbs_info->prev_cpu_nice);
                /*
                 * Assumption: nice time between sampling periods will be
                 * less than 2^32 jiffies for 32 bit sys
                 */
                cur_nice_jiffies = (unsigned long)
                                        cputime64_to_jiffies64(cur_nice);
                dbs_info->prev_cpu_nice = kstat_cpu(cpu).cpustat.nice;
                return idle_time + jiffies_to_usecs(cur_nice_jiffies);
        }
        return idle_time;
}


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
--
To unsubscribe from this list: send the line "unsubscribe cpufreq" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Devel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Forum]     [Linux SCSI]

  Powered by Linux