Messages in this thread | | | Subject | RE: [PATCH] sched: Folding nohz load accounting more accurate | From | Peter Zijlstra <> | Date | Wed, 20 Jun 2012 11:45:28 +0200 |
| |
On Tue, 2012-06-19 at 08:50 -0700, Doug Smythies wrote: > My automated 63 hour test has been terminated, the code changed > and the test re-started.
There's another boo-boo in there:
> @@ -2369,11 +2493,35 @@ void get_avenrun(unsigned long *loads, unsigned long offset, int shift) > */ > void calc_global_load(unsigned long ticks) > { > - long active; > + long active, delta; > > if (time_before(jiffies, calc_load_update + 10)) > return; > > + /* > + * Fold the 'old' idle-delta to include all NO_HZ cpus. > + * > + * cpu0 cpu1 cpu2 .. > + * > + * >--- [sample A] > + * > + * -> NOHZ > + * -> NOHZ > + * ->NOHZ > + * > + * >--- [sample B] > + * > + * >--- [sample C] > + * > + * NOHZ-> (here) > + * > + * Since all CPUs went into NOHZ state, all 'missed' samples (B, C) > + * should include the folded idle-delta. > + */ > + delta += calc_load_fold_idle();
This gives a gcc warning about use without init, which is true, that should be:
delta = calc_load_fold_idle();
> + if (delta) > + atomic_long_add(delta, &calc_load_tasks);
| |