Re: Inconsistent load average on tickless kernels

From: Peter Zijlstra
Date: Wed Feb 29 2012 - 12:03:24 EST


On Wed, 2012-02-29 at 17:24 +0100, Peter Zijlstra wrote:
>
> The only thing I could find is that on nohz we can confuse the per-rq
> sample period, does the below make a difference?

Uhm, something like so that is..

---
kernel/sched/core.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index d7c4322..44f61df 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2380,7 +2380,8 @@ static void calc_load_account_active(struct rq *this_rq)
if (delta)
atomic_long_add(delta, &calc_load_tasks);

- this_rq->calc_load_update += LOAD_FREQ;
+ while (!time_before(jiffies, this_rq->calc_load_update))
+ this_rq->calc_load_update += LOAD_FREQ;
}

/*

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/