lkml.org 
[lkml]   [2012]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: Inconsistent load average on tickless kernels
From
Date
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;
}

/*


\
 
 \ /
  Last update: 2012-02-29 18:05    [W:0.227 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site