lkml.org 
[lkml]   [2015]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC] sched: make update_cpu_load_active care more than one tick
Date
From: Byungchul Park <byungchul.park@lge.com>

i found do_timer accounts other than one tick, so i made
update_cpu_load_active care that.

is it intended because of its overhead?

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
---
kernel/sched/fair.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index ffa70dc..cd3d98f 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4506,12 +4506,15 @@ void update_cpu_load_nohz(void)
*/
void update_cpu_load_active(struct rq *this_rq)
{
+ unsigned long curr_jiffies = READ_ONCE(jiffies);
+ unsigned long pending_updates;
unsigned long load = this_rq->cfs.runnable_load_avg;
/*
* See the mess around update_idle_cpu_load() / update_cpu_load_nohz().
*/
- this_rq->last_load_update_tick = jiffies;
- __update_cpu_load(this_rq, load, 1);
+ pending_updates = curr_jiffies - this_rq->last_load_update_tick;
+ this_rq->last_load_update_tick = curr_jiffies;
+ __update_cpu_load(this_rq, load, pending_updates);
}

/* Used instead of source_load when we know the type == 0 */
--
1.7.9.5


\
 
 \ /
  Last update: 2015-08-13 11:41    [W:0.636 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site