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


Groups > linux.kernel > #1209658

[PATCH v3 2/5] sched: make task_move_group_fair adjust cfs_rq's load in case of queued

From byungchul.park@lge.com
Newsgroups linux.kernel
Subject [PATCH v3 2/5] sched: make task_move_group_fair adjust cfs_rq's load in case of queued
Date 2015-08-19 08:50 +0200
Message-ID <pZ5m9-6uL-3@gated-at.bofh.it> (permalink)
References <pZ5m9-6uL-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Byungchul Park <byungchul.park@lge.com>

se's average load should be added to new cfs_rq, not only in case of
!queued but also in case of queued.

of course, older code managed cfs_rq's blocked load separately. in that
case, the blocked load was meaningful only in case that the se is in
!queued. but now load tracking code is changed, it is not true. code
adjusting cfs_rq's average load should be changed.

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

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 7475a40..191d9be 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -8044,15 +8044,13 @@ static void task_move_group_fair(struct task_struct *p, int queued)
 		se->vruntime -= cfs_rq_of(se)->min_vruntime;
 	set_task_rq(p, task_cpu(p));
 	se->depth = se->parent ? se->parent->depth + 1 : 0;
-	if (!queued) {
-		cfs_rq = cfs_rq_of(se);
+	cfs_rq = cfs_rq_of(se);
+	if (!queued)
 		se->vruntime += cfs_rq->min_vruntime;
-
 #ifdef CONFIG_SMP
-		/* Virtually synchronize task with its new cfs_rq */
-		attach_entity_load_avg(cfs_rq, se);
+	/* Virtually synchronize task with its new cfs_rq */
+	attach_entity_load_avg(cfs_rq, se);
 #endif
-	}
 }
 
 void free_fair_sched_group(struct task_group *tg)
-- 
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/

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


Thread

[PATCH v3 0/5] sync a se with its cfs_rq when att(det)aching it byungchul.park@lge.com - 2015-08-19 08:50 +0200
  [PATCH v3 2/5] sched: make task_move_group_fair adjust cfs_rq's load in case of queued byungchul.park@lge.com - 2015-08-19 08:50 +0200
  [PATCH v3 5/5] sched: add two functions for att(det)aching a task to(from) a cfs_rq byungchul.park@lge.com - 2015-08-19 08:50 +0200
  [PATCH v3 1/5] sched: add two functions adjusting cfs_rq's load when att(det)aching a se byungchul.park@lge.com - 2015-08-19 08:50 +0200
  [PATCH v3 3/5] sched: sync a se with prev cfs_rq when changing cgroup byungchul.park@lge.com - 2015-08-19 08:50 +0200
  [PATCH v3 4/5] sched: sync a se with its cfs_rq when switching sched class to fair class byungchul.park@lge.com - 2015-08-19 08:50 +0200
    Re: [PATCH v3 4/5] sched: sync a se with its cfs_rq when switching  sched class to fair class Peter Zijlstra <peterz@infradead.org> - 2015-08-19 19:20 +0200
      Re: [PATCH v3 4/5] sched: sync a se with its cfs_rq when switching  sched class to fair class Yuyang Du <yuyang.du@intel.com> - 2015-08-20 06:10 +0200
        Re: [PATCH v3 4/5] sched: sync a se with its cfs_rq when switching  sched class to fair class Byungchul Park <byungchul.park@lge.com> - 2015-08-20 08:20 +0200
        Re: [PATCH v3 4/5] sched: sync a se with its cfs_rq when switching  sched class to fair class Peter Zijlstra <peterz@infradead.org> - 2015-08-20 23:20 +0200
          Re: [PATCH v3 4/5] sched: sync a se with its cfs_rq when switching  sched class to fair class Byungchul Park <byungchul.park@lge.com> - 2015-08-21 02:00 +0200
      Re: [PATCH v3 4/5] sched: sync a se with its cfs_rq when switching  sched class to fair class Byungchul Park <byungchul.park@lge.com> - 2015-08-20 07:30 +0200
  Re: [PATCH v3 0/5] sync a se with its cfs_rq when att(det)aching it Byungchul Park <byungchul.park@lge.com> - 2015-08-19 09:10 +0200
  Re: [PATCH v3 0/5] sync a se with its cfs_rq when att(det)aching it Peter Zijlstra <peterz@infradead.org> - 2015-08-20 03:20 +0200
    Re: [PATCH v3 0/5] sync a se with its cfs_rq when att(det)aching it Byungchul Park <byungchul.park@lge.com> - 2015-08-20 07:30 +0200
    Re: [PATCH v3 0/5] sync a se with its cfs_rq when att(det)aching it Byungchul Park <byungchul.park@lge.com> - 2015-08-20 10:40 +0200
      Re: [PATCH v3 0/5] sync a se with its cfs_rq when att(det)aching it Byungchul Park <byungchul.park@lge.com> - 2015-08-20 12:50 +0200
        Re: [PATCH v3 0/5] sync a se with its cfs_rq when att(det)aching it Peter Zijlstra <peterz@infradead.org> - 2015-08-20 23:20 +0200
          Re: [PATCH v3 0/5] sync a se with its cfs_rq when att(det)aching it Byungchul Park <byungchul.park@lge.com> - 2015-08-21 02:10 +0200

csiph-web