@@ -3690,8 +3690,6 @@ static inline unsigned long cfs_rq_load_avg(struct cfs_rq *cfs_rq)
36903690 return cfs_rq -> avg .load_avg ;
36913691}
36923692
3693- static int idle_balance (struct rq * this_rq , struct rq_flags * rf );
3694-
36953693static inline unsigned long task_util (struct task_struct * p )
36963694{
36973695 return READ_ONCE (p -> se .avg .util_avg );
@@ -6878,11 +6876,10 @@ done: __maybe_unused;
68786876 return p ;
68796877
68806878idle :
6881- update_misfit_status (NULL , rq );
6882- new_tasks = idle_balance (rq , rf );
6879+ new_tasks = newidle_balance (rq , rf );
68836880
68846881 /*
6885- * Because idle_balance () releases (and re-acquires) rq->lock, it is
6882+ * Because newidle_balance () releases (and re-acquires) rq->lock, it is
68866883 * possible for any higher priority task to appear. In that case we
68876884 * must re-start the pick_next_entity() loop.
68886885 */
@@ -9045,10 +9042,10 @@ static int load_balance(int this_cpu, struct rq *this_rq,
90459042 ld_moved = 0 ;
90469043
90479044 /*
9048- * idle_balance () disregards balance intervals, so we could repeatedly
9049- * reach this code, which would lead to balance_interval skyrocketting
9050- * in a short amount of time. Skip the balance_interval increase logic
9051- * to avoid that.
9045+ * newidle_balance () disregards balance intervals, so we could
9046+ * repeatedly reach this code, which would lead to balance_interval
9047+ * skyrocketting in a short amount of time. Skip the balance_interval
9048+ * increase logic to avoid that.
90529049 */
90539050 if (env .idle == CPU_NEWLY_IDLE )
90549051 goto out ;
@@ -9758,14 +9755,15 @@ static inline void nohz_newidle_balance(struct rq *this_rq) { }
97589755 * idle_balance is called by schedule() if this_cpu is about to become
97599756 * idle. Attempts to pull tasks from other CPUs.
97609757 */
9761- static int idle_balance (struct rq * this_rq , struct rq_flags * rf )
9758+ int newidle_balance (struct rq * this_rq , struct rq_flags * rf )
97629759{
97639760 unsigned long next_balance = jiffies + HZ ;
97649761 int this_cpu = this_rq -> cpu ;
97659762 struct sched_domain * sd ;
97669763 int pulled_task = 0 ;
97679764 u64 curr_cost = 0 ;
97689765
9766+ update_misfit_status (NULL , this_rq );
97699767 /*
97709768 * We must set idle_stamp _before_ calling idle_balance(), such that we
97719769 * measure the duration of idle_balance() as idle time.
0 commit comments