Skip to contentSkip to conversation

sched/fair: Remove unused parameter idle of _nohz_idle_balance()

PATCH Superseded Hao Jia 1 participant 2 messages Jul 10, 2022 – Jul 18, 2022 Scheduler

lore
Share & tools
lore

Hao Jia

author
#0 lore raw

PATCH v2 1/1 sched/fair: Remove unused parameter idle of _nohz_idle_balance()

Commit 7a82e5f52a35 ("sched/fair: Merge for each idle cpu loop of ILB") has been merged. The parameter idle of _nohz_idle_balance() is not used anymore so we can remove it.

---
 kernel/sched/fair.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
kernel/sched/fair.c +3 -4
index 77b2048a9326..8d4be2a95e37 100644
@@ -10682,8 +10682,7 @@ static bool update_nohz_stats(struct rq *rq)
  * can be a simple update of blocked load or a complete load balance with
  * tasks movement depending of flags.
  */
-static void _nohz_idle_balance(struct rq *this_rq, unsigned int flags,
-			       enum cpu_idle_type idle)
+static void _nohz_idle_balance(struct rq *this_rq, unsigned int flags)
 {
 	/* Earliest time when we have to do rebalance again */
 	unsigned long now = jiffies;
@@ -10798,7 +10797,7 @@ static bool nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle)
 	if (idle != CPU_IDLE)
 		return false;
 
-	_nohz_idle_balance(this_rq, flags, idle);
+	_nohz_idle_balance(this_rq, flags);
 
 	return true;
 }
@@ -10818,7 +10817,7 @@ void nohz_run_idle_balance(int cpu)
 	 * (ie NOHZ_STATS_KICK set) and will do the same.
 	 */
 	if ((flags == NOHZ_NEWILB_KICK) && !need_resched())
-		_nohz_idle_balance(cpu_rq(cpu), NOHZ_STATS_KICK, CPU_IDLE);
+		_nohz_idle_balance(cpu_rq(cpu), NOHZ_STATS_KICK);
 }
 
 static void nohz_newidle_balance(struct rq *this_rq)
Signature · 1 line
2.32.0
author
#1 lore raw

gentle ping.

Quoted 6 lines · On 2022/7/10 Hao Jia wrote:

Commit 7a82e5f52a35 ("sched/fair: Merge for each idle cpu loop of ILB") has been merged. The parameter idle of _nohz_idle_balance() is not used anymore so we can remove it.

Hi Peter,
The patch got Reviewed-by from Vincent.
If you have time, please review the patch.

Regards,
Hao

Quoted 36 lines
---
  kernel/sched/fair.c | 7 +++----
  1 file changed, 3 insertions(+), 4 deletions(-)
kernel/sched/fair.c +3 -4
index 77b2048a9326..8d4be2a95e37 100644
@@ -10682,8 +10682,7 @@ static bool update_nohz_stats(struct rq *rq)
   * can be a simple update of blocked load or a complete load balance with
   * tasks movement depending of flags.
   */
-static void _nohz_idle_balance(struct rq *this_rq, unsigned int flags,
-			       enum cpu_idle_type idle)
+static void _nohz_idle_balance(struct rq *this_rq, unsigned int flags)
  {
  	/* Earliest time when we have to do rebalance again */
  	unsigned long now = jiffies;
@@ -10798,7 +10797,7 @@ static bool nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle)
  	if (idle != CPU_IDLE)
  		return false;
 
-	_nohz_idle_balance(this_rq, flags, idle);
+	_nohz_idle_balance(this_rq, flags);
 
  	return true;
  }
@@ -10818,7 +10817,7 @@ void nohz_run_idle_balance(int cpu)
  	 * (ie NOHZ_STATS_KICK set) and will do the same.
  	 */
  	if ((flags == NOHZ_NEWILB_KICK) && !need_resched())
-		_nohz_idle_balance(cpu_rq(cpu), NOHZ_STATS_KICK, CPU_IDLE);
+		_nohz_idle_balance(cpu_rq(cpu), NOHZ_STATS_KICK);
  }
 
  static void nohz_newidle_balance(struct rq *this_rq)