@@ -4909,7 +4909,7 @@ static inline void update_misfit_status(struct task_struct *p, struct rq *rq) {}
4909
4909
#endif /* CONFIG_SMP */
4910
4910
4911
4911
static void
4912
- place_entity (struct cfs_rq * cfs_rq , struct sched_entity * se , int initial )
4912
+ place_entity (struct cfs_rq * cfs_rq , struct sched_entity * se , int flags )
4913
4913
{
4914
4914
u64 vslice = calc_delta_fair (se -> slice , se );
4915
4915
u64 vruntime = avg_vruntime (cfs_rq );
@@ -4998,7 +4998,7 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
4998
4998
* on average, halfway through their slice, as such start tasks
4999
4999
* off with half a slice to ease into the competition.
5000
5000
*/
5001
- if (sched_feat (PLACE_DEADLINE_INITIAL ) && initial )
5001
+ if (sched_feat (PLACE_DEADLINE_INITIAL ) && ( flags & ENQUEUE_INITIAL ) )
5002
5002
vslice /= 2 ;
5003
5003
5004
5004
/*
@@ -5022,7 +5022,7 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
5022
5022
* update_curr().
5023
5023
*/
5024
5024
if (curr )
5025
- place_entity (cfs_rq , se , 0 );
5025
+ place_entity (cfs_rq , se , flags );
5026
5026
5027
5027
update_curr (cfs_rq );
5028
5028
@@ -5049,7 +5049,7 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
5049
5049
* we can place the entity.
5050
5050
*/
5051
5051
if (!curr )
5052
- place_entity (cfs_rq , se , 0 );
5052
+ place_entity (cfs_rq , se , flags );
5053
5053
5054
5054
account_entity_enqueue (cfs_rq , se );
5055
5055
@@ -12280,7 +12280,7 @@ static void task_fork_fair(struct task_struct *p)
12280
12280
curr = cfs_rq -> curr ;
12281
12281
if (curr )
12282
12282
update_curr (cfs_rq );
12283
- place_entity (cfs_rq , se , 1 );
12283
+ place_entity (cfs_rq , se , ENQUEUE_INITIAL );
12284
12284
rq_unlock (rq , & rf );
12285
12285
}
12286
12286
0 commit comments