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


Groups > linux.kernel > #1207612

[PATCH 6/6] sched/fair: Initialize task load and utilization before placing task on rq

From Morten Rasmussen <morten.rasmussen@arm.com>
Newsgroups linux.kernel
Subject [PATCH 6/6] sched/fair: Initialize task load and utilization before placing task on rq
Date 2015-08-14 18:30 +0200
Message-ID <pXq1H-7le-15@gated-at.bofh.it> (permalink)
References <pXq1H-7le-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Task load or utilization is not currently considered in
select_task_rq_fair(), but if we want that in the future we should make
sure it is not zero for new tasks.

cc: Ingo Molnar <mingo@redhat.com>
cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Morten Rasmussen <morten.rasmussen@arm.com>
---
 kernel/sched/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index b11f624..ae9fca32 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2294,6 +2294,8 @@ void wake_up_new_task(struct task_struct *p)
 	struct rq *rq;
 
 	raw_spin_lock_irqsave(&p->pi_lock, flags);
+	/* Initialize new task's runnable average */
+	init_entity_runnable_average(&p->se);
 #ifdef CONFIG_SMP
 	/*
 	 * Fork balancing, do it here and not earlier because:
@@ -2303,8 +2305,6 @@ void wake_up_new_task(struct task_struct *p)
 	set_task_cpu(p, select_task_rq(p, task_cpu(p), SD_BALANCE_FORK, 0));
 #endif
 
-	/* Initialize new task's runnable average */
-	init_entity_runnable_average(&p->se);
 	rq = __task_rq_lock(p);
 	activate_task(rq, p, 0);
 	p->on_rq = TASK_ON_RQ_QUEUED;
-- 
1.9.1

--
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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/6] sched/fair: Compute capacity invariant load/utilization tracking Morten Rasmussen <morten.rasmussen@arm.com> - 2015-08-14 18:30 +0200
  [PATCH 4/6] sched/fair: Name utilization related data and functions consistently Morten Rasmussen <morten.rasmussen@arm.com> - 2015-08-14 18:30 +0200
  [PATCH 6/6] sched/fair: Initialize task load and utilization before placing task on rq Morten Rasmussen <morten.rasmussen@arm.com> - 2015-08-14 18:30 +0200
  [PATCH 3/6] sched/fair: Make utilization tracking cpu scale-invariant Morten Rasmussen <morten.rasmussen@arm.com> - 2015-08-14 18:30 +0200
    Re: [PATCH 3/6] sched/fair: Make utilization tracking cpu scale-invariant Dietmar Eggemann <dietmar.eggemann@arm.com> - 2015-08-15 01:10 +0200
  Re: [PATCH 0/6] sched/fair: Compute capacity invariant  load/utilization tracking Peter Zijlstra <peterz@infradead.org> - 2015-08-17 00:10 +0200
    Re: [PATCH 0/6] sched/fair: Compute capacity invariant  load/utilization tracking Morten Rasmussen <morten.rasmussen@arm.com> - 2015-08-17 13:30 +0200
      Re: [PATCH 0/6] sched/fair: Compute capacity invariant  load/utilization tracking Peter Zijlstra <peterz@infradead.org> - 2015-08-17 13:50 +0200

csiph-web