[COMMON] sched/rt: update sched_rt_entity
authorJohnlay Park <jonglae.park@samsung.com>
Wed, 28 Feb 2018 07:03:52 +0000 (16:03 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:33:14 +0000 (17:33 +0900)
For task changing its policy or group

Change-Id: I594332064c172bce50f0d4b8134e992a52c2576d
Signed-off-by: Johnlay Park <jonglae.park@samsung.com>
kernel/sched/rt.c

index bd0217c2e9838622ec5fbfc1a0e957fed1de2496..4ee56235052a31a39dc5bcbbd634bf195efcc751 100644 (file)
@@ -2732,9 +2732,15 @@ static void task_tick_rt(struct rq *rq, struct task_struct *p, int queued)
 static void set_curr_task_rt(struct rq *rq)
 {
        struct task_struct *p = rq->curr;
+       struct sched_rt_entity *rt_se = &p->rt;
 
        p->se.exec_start = rq_clock_task(rq);
 
+       for_each_sched_rt_entity(rt_se) {
+               struct rt_rq *rt_rq = rt_rq_of_se(rt_se);
+               rt_rq->curr = rt_se;
+       }
+
        /* The running task is never eligible for pushing */
        dequeue_pushable_task(rq, p);
 }