All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched/fair: Remove unused parameter idle of _nohz_idle_balance()
@ 2022-07-07  3:41 Hao Jia
  2022-07-07 14:17 ` Vincent Guittot
  0 siblings, 1 reply; 4+ messages in thread
From: Hao Jia @ 2022-07-07  3:41 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
	rostedt, bsegall, mgorman, bristot, vschneid
  Cc: linux-kernel, Hao Jia

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

Signed-off-by: Hao Jia <jiahao.os@bytedance.com>
---
 kernel/sched/fair.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 77b2048a9326..8d4be2a95e37 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -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)
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] sched/fair: Remove unused parameter idle of _nohz_idle_balance()
  2022-07-07  3:41 [PATCH] sched/fair: Remove unused parameter idle of _nohz_idle_balance() Hao Jia
@ 2022-07-07 14:17 ` Vincent Guittot
  2022-07-08 10:31   ` [External] " Hao Jia
  0 siblings, 1 reply; 4+ messages in thread
From: Vincent Guittot @ 2022-07-07 14:17 UTC (permalink / raw)
  To: Hao Jia
  Cc: mingo, peterz, juri.lelli, dietmar.eggemann, rostedt, bsegall,
	mgorman, bristot, vschneid, linux-kernel

On Thu, 7 Jul 2022 at 05:42, Hao Jia <jiahao.os@bytedance.com> wrote:
>
> Since commit 7a82e5f52a35 ("sched/fair: Merge for each idle cpu
> loop of ILB") was merged. The parameter idle of _nohz_idle_balance()

The description of the commit should be in a single line.

commit 7a82e5f52a35 ("sched/fair: Merge for each idle cpu loop of ILB")

> is not used anymore so we can remove it.
>
> Signed-off-by: Hao Jia <jiahao.os@bytedance.com>

Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>

> ---
>  kernel/sched/fair.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 77b2048a9326..8d4be2a95e37 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -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)
> --
> 2.32.0
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [External] Re: [PATCH] sched/fair: Remove unused parameter idle of _nohz_idle_balance()
  2022-07-07 14:17 ` Vincent Guittot
@ 2022-07-08 10:31   ` Hao Jia
  2022-07-08 12:50     ` Vincent Guittot
  0 siblings, 1 reply; 4+ messages in thread
From: Hao Jia @ 2022-07-08 10:31 UTC (permalink / raw)
  To: Vincent Guittot
  Cc: mingo, peterz, juri.lelli, dietmar.eggemann, rostedt, bsegall,
	mgorman, bristot, vschneid, linux-kernel



On 2022/7/7 Vincent Guittot wrote:
> On Thu, 7 Jul 2022 at 05:42, Hao Jia <jiahao.os@bytedance.com> wrote:
>>
>> Since commit 7a82e5f52a35 ("sched/fair: Merge for each idle cpu
>> loop of ILB") was merged. The parameter idle of _nohz_idle_balance()
> 
> The description of the commit should be in a single line.
> 
> commit 7a82e5f52a35 ("sched/fair: Merge for each idle cpu loop of ILB")
> 

Thank you for your suggestion.

how about this?

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.

Signed-off-by: Hao Jia <jiahao.os@bytedance.com>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>

>> is not used anymore so we can remove it.
>>
>> Signed-off-by: Hao Jia <jiahao.os@bytedance.com>
> 
> Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
> 
>> ---
>>   kernel/sched/fair.c | 7 +++----
>>   1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> index 77b2048a9326..8d4be2a95e37 100644
>> --- a/kernel/sched/fair.c
>> +++ b/kernel/sched/fair.c
>> @@ -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)
>> --
>> 2.32.0
>>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [External] Re: [PATCH] sched/fair: Remove unused parameter idle of _nohz_idle_balance()
  2022-07-08 10:31   ` [External] " Hao Jia
@ 2022-07-08 12:50     ` Vincent Guittot
  0 siblings, 0 replies; 4+ messages in thread
From: Vincent Guittot @ 2022-07-08 12:50 UTC (permalink / raw)
  To: Hao Jia
  Cc: mingo, peterz, juri.lelli, dietmar.eggemann, rostedt, bsegall,
	mgorman, bristot, vschneid, linux-kernel

On Fri, 8 Jul 2022 at 12:32, Hao Jia <jiahao.os@bytedance.com> wrote:
>
>
>
> On 2022/7/7 Vincent Guittot wrote:
> > On Thu, 7 Jul 2022 at 05:42, Hao Jia <jiahao.os@bytedance.com> wrote:
> >>
> >> Since commit 7a82e5f52a35 ("sched/fair: Merge for each idle cpu
> >> loop of ILB") was merged. The parameter idle of _nohz_idle_balance()
> >
> > The description of the commit should be in a single line.
> >
> > commit 7a82e5f52a35 ("sched/fair: Merge for each idle cpu loop of ILB")
> >
>
> Thank you for your suggestion.
>
> how about this?

looks good to me

>
> 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.
>
> Signed-off-by: Hao Jia <jiahao.os@bytedance.com>
> Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
>
> >> is not used anymore so we can remove it.
> >>
> >> Signed-off-by: Hao Jia <jiahao.os@bytedance.com>
> >
> > Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
> >
> >> ---
> >>   kernel/sched/fair.c | 7 +++----
> >>   1 file changed, 3 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> >> index 77b2048a9326..8d4be2a95e37 100644
> >> --- a/kernel/sched/fair.c
> >> +++ b/kernel/sched/fair.c
> >> @@ -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)
> >> --
> >> 2.32.0
> >>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-08 12:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07  3:41 [PATCH] sched/fair: Remove unused parameter idle of _nohz_idle_balance() Hao Jia
2022-07-07 14:17 ` Vincent Guittot
2022-07-08 10:31   ` [External] " Hao Jia
2022-07-08 12:50     ` Vincent Guittot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.