|
@@ -3083,6 +3083,12 @@ static int idle_balance(struct rq *this_rq);
|
|
|
|
|
|
#else /* CONFIG_SMP */
|
|
#else /* CONFIG_SMP */
|
|
|
|
|
|
|
|
+static inline int
|
|
|
|
+update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq, bool update_freq)
|
|
|
|
+{
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
static inline void update_load_avg(struct sched_entity *se, int not_used)
|
|
static inline void update_load_avg(struct sched_entity *se, int not_used)
|
|
{
|
|
{
|
|
struct cfs_rq *cfs_rq = cfs_rq_of(se);
|
|
struct cfs_rq *cfs_rq = cfs_rq_of(se);
|
|
@@ -8368,6 +8374,7 @@ static void detach_task_cfs_rq(struct task_struct *p)
|
|
{
|
|
{
|
|
struct sched_entity *se = &p->se;
|
|
struct sched_entity *se = &p->se;
|
|
struct cfs_rq *cfs_rq = cfs_rq_of(se);
|
|
struct cfs_rq *cfs_rq = cfs_rq_of(se);
|
|
|
|
+ u64 now = cfs_rq_clock_task(cfs_rq);
|
|
|
|
|
|
if (!vruntime_normalized(p)) {
|
|
if (!vruntime_normalized(p)) {
|
|
/*
|
|
/*
|
|
@@ -8379,6 +8386,7 @@ static void detach_task_cfs_rq(struct task_struct *p)
|
|
}
|
|
}
|
|
|
|
|
|
/* Catch up with the cfs_rq and remove our load when we leave */
|
|
/* Catch up with the cfs_rq and remove our load when we leave */
|
|
|
|
+ update_cfs_rq_load_avg(now, cfs_rq, false);
|
|
detach_entity_load_avg(cfs_rq, se);
|
|
detach_entity_load_avg(cfs_rq, se);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -8386,6 +8394,7 @@ static void attach_task_cfs_rq(struct task_struct *p)
|
|
{
|
|
{
|
|
struct sched_entity *se = &p->se;
|
|
struct sched_entity *se = &p->se;
|
|
struct cfs_rq *cfs_rq = cfs_rq_of(se);
|
|
struct cfs_rq *cfs_rq = cfs_rq_of(se);
|
|
|
|
+ u64 now = cfs_rq_clock_task(cfs_rq);
|
|
|
|
|
|
#ifdef CONFIG_FAIR_GROUP_SCHED
|
|
#ifdef CONFIG_FAIR_GROUP_SCHED
|
|
/*
|
|
/*
|
|
@@ -8396,6 +8405,7 @@ static void attach_task_cfs_rq(struct task_struct *p)
|
|
#endif
|
|
#endif
|
|
|
|
|
|
/* Synchronize task with its cfs_rq */
|
|
/* Synchronize task with its cfs_rq */
|
|
|
|
+ update_cfs_rq_load_avg(now, cfs_rq, false);
|
|
attach_entity_load_avg(cfs_rq, se);
|
|
attach_entity_load_avg(cfs_rq, se);
|
|
|
|
|
|
if (!vruntime_normalized(p))
|
|
if (!vruntime_normalized(p))
|