All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Guittot <vincent.guittot@linaro.org>
To: Vincent Donnefort <Vincent.Donnefort@arm.com>
Cc: peterz@infradead.org, mingo@redhat.com,
	linux-kernel@vger.kernel.org, dietmar.eggemann@arm.com,
	Valentin.Schneider@arm.com
Subject: Re: [PATCH] sched/fair: Fix asym_fits_capacity() task_util type
Date: Thu, 18 Nov 2021 14:54:37 +0100	[thread overview]
Message-ID: <CAKfTPtAU9t=X8e3WiVh=pd-JwQwCroGz6xiyuj-WwqsEwOcMxA@mail.gmail.com> (raw)
In-Reply-To: <20211118110152.2598200-1-vincent.donnefort@arm.com>

On Thu, 18 Nov 2021 at 12:02, Vincent Donnefort
<vincent.donnefort@arm.com> wrote:
>
> task_util is an unsigned long value, compared with a CPU capacity which is
> unsigned long as well. There's no need for an intermidiate implicit int

s/intermidiate/intermediate/

> cast.

I can't remember how I end up using int instead of unsigned long

Side note: similarly task_fits_capacity uses long instead of unsigned
long for cpu's capacity parameter

>
> Fixes: b4c9c9f15649 ("sched/fair: Prefer prev cpu in asymmetric wakeup path")
> Signed-off-by: Vincent Donnefort <vincent.donnefort@arm.com>

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

>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 945d987246c5..8fde6e10e24b 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -6346,7 +6346,7 @@ select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target)
>         return best_cpu;
>  }
>
> -static inline bool asym_fits_capacity(int task_util, int cpu)
> +static inline bool asym_fits_capacity(unsigned long task_util, int cpu)
>  {
>         if (static_branch_unlikely(&sched_asym_cpucapacity))
>                 return fits_capacity(task_util, capacity_of(cpu));
> --
> 2.25.1
>

      reply	other threads:[~2021-11-18 13:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-18 11:01 [PATCH] sched/fair: Fix asym_fits_capacity() task_util type Vincent Donnefort
2021-11-18 13:54 ` Vincent Guittot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKfTPtAU9t=X8e3WiVh=pd-JwQwCroGz6xiyuj-WwqsEwOcMxA@mail.gmail.com' \
    --to=vincent.guittot@linaro.org \
    --cc=Valentin.Schneider@arm.com \
    --cc=Vincent.Donnefort@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.