sched: Fix compilation errors when CFS_BANDWIDTH && !SCHED_HMP
There are few compiler errors and warnings when CFS_BANDWIDTH config is enabled but not SCHED_HMP. Change-Id: Idaf4a7364564b6faf56df2eb3a1a74eeb242d57e Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
parent
f1a15235d6
commit
f6471c2c9d
1 changed files with 5 additions and 18 deletions
|
@ -3640,15 +3640,8 @@ static inline void inc_cfs_rq_hmp_stats(struct cfs_rq *cfs_rq,
|
|||
static inline void dec_cfs_rq_hmp_stats(struct cfs_rq *cfs_rq,
|
||||
struct task_struct *p, int change_cra) { }
|
||||
|
||||
static inline void inc_throttled_cfs_rq_hmp_stats(struct hmp_sched_stats *stats,
|
||||
struct cfs_rq *cfs_rq)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void dec_throttled_cfs_rq_hmp_stats(struct hmp_sched_stats *stats,
|
||||
struct cfs_rq *cfs_rq)
|
||||
{
|
||||
}
|
||||
#define dec_throttled_cfs_rq_hmp_stats(...)
|
||||
#define inc_throttled_cfs_rq_hmp_stats(...)
|
||||
|
||||
#endif /* CONFIG_SCHED_HMP */
|
||||
|
||||
|
@ -4676,6 +4669,7 @@ static inline int cfs_rq_throttled(struct cfs_rq *cfs_rq)
|
|||
return cfs_bandwidth_used() && cfs_rq->throttled;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SCHED_HMP
|
||||
/*
|
||||
* Check if task is part of a hierarchy where some cfs_rq does not have any
|
||||
* runtime left.
|
||||
|
@ -4702,6 +4696,7 @@ static int task_will_be_throttled(struct task_struct *p)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* check whether cfs_rq, or any parent, is throttled */
|
||||
static inline int throttled_hierarchy(struct cfs_rq *cfs_rq)
|
||||
|
@ -4782,9 +4777,7 @@ static void throttle_cfs_rq(struct cfs_rq *cfs_rq)
|
|||
if (dequeue)
|
||||
dequeue_entity(qcfs_rq, se, DEQUEUE_SLEEP);
|
||||
qcfs_rq->h_nr_running -= task_delta;
|
||||
#ifdef CONFIG_SCHED_HMP
|
||||
dec_throttled_cfs_rq_hmp_stats(&qcfs_rq->hmp_stats, cfs_rq);
|
||||
#endif
|
||||
|
||||
if (qcfs_rq->load.weight)
|
||||
dequeue = 0;
|
||||
|
@ -4792,9 +4785,7 @@ static void throttle_cfs_rq(struct cfs_rq *cfs_rq)
|
|||
|
||||
if (!se) {
|
||||
sub_nr_running(rq, task_delta);
|
||||
#ifdef CONFIG_SCHED_HMP
|
||||
dec_throttled_cfs_rq_hmp_stats(&rq->hmp_stats, cfs_rq);
|
||||
#endif
|
||||
}
|
||||
|
||||
cfs_rq->throttled = 1;
|
||||
|
@ -4831,7 +4822,7 @@ void unthrottle_cfs_rq(struct cfs_rq *cfs_rq)
|
|||
struct sched_entity *se;
|
||||
int enqueue = 1;
|
||||
long task_delta;
|
||||
struct cfs_rq *tcfs_rq = cfs_rq;
|
||||
struct cfs_rq *tcfs_rq __maybe_unused = cfs_rq;
|
||||
|
||||
se = cfs_rq->tg->se[cpu_of(rq)];
|
||||
|
||||
|
@ -4859,9 +4850,7 @@ void unthrottle_cfs_rq(struct cfs_rq *cfs_rq)
|
|||
if (enqueue)
|
||||
enqueue_entity(cfs_rq, se, ENQUEUE_WAKEUP);
|
||||
cfs_rq->h_nr_running += task_delta;
|
||||
#ifdef CONFIG_SCHED_HMP
|
||||
inc_throttled_cfs_rq_hmp_stats(&cfs_rq->hmp_stats, tcfs_rq);
|
||||
#endif
|
||||
|
||||
if (cfs_rq_throttled(cfs_rq))
|
||||
break;
|
||||
|
@ -4869,9 +4858,7 @@ void unthrottle_cfs_rq(struct cfs_rq *cfs_rq)
|
|||
|
||||
if (!se) {
|
||||
add_nr_running(rq, task_delta);
|
||||
#ifdef CONFIG_SCHED_HMP
|
||||
inc_throttled_cfs_rq_hmp_stats(&rq->hmp_stats, tcfs_rq);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* determine whether we need to wake up potentially idle cpu */
|
||||
|
|
Loading…
Add table
Reference in a new issue