Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1206656 > unrolled thread

[RFC] sched: make update_cpu_load_active care more than one tick

Started bybyungchul.park@lge.com
First post2015-08-13 11:40 +0200
Last post2015-08-18 01:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [RFC] sched: make update_cpu_load_active care more than one tick byungchul.park@lge.com - 2015-08-13 11:40 +0200
    Re: [RFC] sched: make update_cpu_load_active care more than one tick Byungchul Park <byungchul.park@lge.com> - 2015-08-18 01:50 +0200

#1206656 — [RFC] sched: make update_cpu_load_active care more than one tick

Frombyungchul.park@lge.com
Date2015-08-13 11:40 +0200
Subject[RFC] sched: make update_cpu_load_active care more than one tick
Message-ID<pWX9q-7Kj-39@gated-at.bofh.it>
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

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

[toc] | [next] | [standalone]


#1208950

FromByungchul Park <byungchul.park@lge.com>
Date2015-08-18 01:50 +0200
Message-ID<pYCk9-5wZ-5@gated-at.bofh.it>
In reply to#1206656
On Thu, Aug 13, 2015 at 06:35:24PM +0900, byungchul.park@lge.com wrote:
> 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?

hello,

is there anyone who can tell me any opinion about this concern?

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web