Messages in this thread | | | Date | Tue, 15 Apr 2014 10:48:54 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH 1/2] nohz: stop updating sleep stats from get_cpu_{idle,iowait}_time_us() |
| |
On Thu, Apr 10, 2014 at 06:11:03PM +0900, Hidetoshi Seto wrote: > - if (ts->idle_active) { > - delta = ktime_sub(now, ts->idle_entrytime); > - if (nr_iowait_cpu(cpu) > 0) > - ts->iowait_sleeptime = ktime_add(ts->iowait_sleeptime, delta); > - else > - ts->idle_sleeptime = ktime_add(ts->idle_sleeptime, delta); > - ts->idle_entrytime = now; > - } > - > - if (last_update_time) > - *last_update_time = ktime_to_us(now); > - > -} > - > -static void tick_nohz_stop_idle(struct tick_sched *ts, ktime_t now) > -{ > - update_ts_time_stats(smp_processor_id(), ts, now, NULL); > + /* Updates the per cpu time idle statistics counters */ > + delta = ktime_sub(now, ts->idle_entrytime); > + if (nr_iowait_cpu(smp_processor_id()) > 0)
Now I know the old code also uses nr_iowait_cpu(), but that function is crackbrained. This cannot possibly be right.
Anything using nr_iowait_cpu() is broken beyond repair.
| |