Commit d91cecc1 authored by Chen Yu's avatar Chen Yu Committed by Peter Zijlstra

sched: Make newidle_balance() static again

After Commit 6e2df058 ("sched: Fix pick_next_task() vs 'change'
pattern race"), there is no need to expose newidle_balance() as it
is only used within fair.c file. Change this function back to static again.

No functional change.
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Suggested-by: default avatarPeter Zijlstra <peterz@infradead.org>
Signed-off-by: default avatarChen Yu <yu.c.chen@intel.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/83cd3030b031ca5d646cd5e225be10e7a0fdd8f5.1587464698.git.yu.c.chen@intel.com
parent 36c5bdc4
...@@ -3873,6 +3873,8 @@ static inline unsigned long cfs_rq_load_avg(struct cfs_rq *cfs_rq) ...@@ -3873,6 +3873,8 @@ static inline unsigned long cfs_rq_load_avg(struct cfs_rq *cfs_rq)
return cfs_rq->avg.load_avg; return cfs_rq->avg.load_avg;
} }
static int newidle_balance(struct rq *this_rq, struct rq_flags *rf);
static inline unsigned long task_util(struct task_struct *p) static inline unsigned long task_util(struct task_struct *p)
{ {
return READ_ONCE(p->se.avg.util_avg); return READ_ONCE(p->se.avg.util_avg);
...@@ -4054,7 +4056,7 @@ attach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se) {} ...@@ -4054,7 +4056,7 @@ attach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se) {}
static inline void static inline void
detach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se) {} detach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se) {}
static inline int idle_balance(struct rq *rq, struct rq_flags *rf) static inline int newidle_balance(struct rq *rq, struct rq_flags *rf)
{ {
return 0; return 0;
} }
...@@ -10414,7 +10416,7 @@ static inline void nohz_newidle_balance(struct rq *this_rq) { } ...@@ -10414,7 +10416,7 @@ static inline void nohz_newidle_balance(struct rq *this_rq) { }
* 0 - failed, no new tasks * 0 - failed, no new tasks
* > 0 - success, new (fair) tasks present * > 0 - success, new (fair) tasks present
*/ */
int newidle_balance(struct rq *this_rq, struct rq_flags *rf) static int newidle_balance(struct rq *this_rq, struct rq_flags *rf)
{ {
unsigned long next_balance = jiffies + HZ; unsigned long next_balance = jiffies + HZ;
int this_cpu = this_rq->cpu; int this_cpu = this_rq->cpu;
......
...@@ -1503,14 +1503,10 @@ static inline void unregister_sched_domain_sysctl(void) ...@@ -1503,14 +1503,10 @@ static inline void unregister_sched_domain_sysctl(void)
} }
#endif #endif
extern int newidle_balance(struct rq *this_rq, struct rq_flags *rf);
#else #else
static inline void sched_ttwu_pending(void) { } static inline void sched_ttwu_pending(void) { }
static inline int newidle_balance(struct rq *this_rq, struct rq_flags *rf) { return 0; }
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
#include "stats.h" #include "stats.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment