linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: mika.penttila@gmail.com, LKML <linux-kernel@vger.kernel.org>,
	Li RongQing <lirongqing@baidu.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Ingo Molnar <mingo@redhat.com>,
	kvm@vger.kernel.org, Mel Gorman <mgorman@suse.de>
Subject: Re: [PATCH] is_core_idle() is using a wrong variable
Date: Thu, 29 Jul 2021 06:26:34 +0200	[thread overview]
Message-ID: <CAM9Jb+j5KbuuMD9mRNbBD9wn5ga8+GBcjPTVgiesfVQKctP0pQ@mail.gmail.com> (raw)
In-Reply-To: <YQE0P9PLd3Uib7eu@hirez.programming.kicks-ass.net>

On Wed, 28 Jul 2021 at 12:46, Peter Zijlstra <peterz@infradead.org> wrote:
>
> On Thu, Jul 22, 2021 at 09:39:46AM +0300, mika.penttila@gmail.com wrote:
> > From: Mika Penttilä <mika.penttila@gmail.com>
> >
> > is_core_idle() was using a wrong variable in the loop test. Fix it.
> >
> > Signed-off-by: Mika Penttilä <mika.penttila@gmail.com>
>
> Thanks!
>
> ---
> Subject: sched/numa: Fix is_core_idle()
> From: Mika Penttilä <mika.penttila@gmail.com>
> Date: Thu, 22 Jul 2021 09:39:46 +0300
>
> From: Mika Penttilä <mika.penttila@gmail.com>
>
> Use the loop variable instead of the function argument to test the
> other SMT siblings for idle.
>
> Fixes: ff7db0bf24db ("sched/numa: Prefer using an idle CPU as a migration target instead of comparing tasks")
> Signed-off-by: Mika Penttilä <mika.penttila@gmail.com>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> Link: https://lkml.kernel.org/r/20210722063946.28951-1-mika.penttila@gmail.com
> ---
>  kernel/sched/fair.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -1486,7 +1486,7 @@ static inline bool is_core_idle(int cpu)
>                 if (cpu == sibling)
>                         continue;
>
> -               if (!idle_cpu(cpu))
> +               if (!idle_cpu(sibling))
>                         return false;
>         }
>  #endif

Acked-by: Pankaj Gupta <pankaj.gupta@ionos.com>

  parent reply	other threads:[~2021-07-29  4:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22  6:39 [PATCH] is_core_idle() is using a wrong variable mika.penttila
2021-07-28 10:41 ` Peter Zijlstra
2021-07-28 11:50   ` Mel Gorman
2021-07-29  4:26   ` Pankaj Gupta [this message]
2021-08-05  9:34 ` [tip: sched/core] sched/numa: Fix is_core_idle() tip-bot2 for Mika Penttilä

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=CAM9Jb+j5KbuuMD9mRNbBD9wn5ga8+GBcjPTVgiesfVQKctP0pQ@mail.gmail.com \
    --to=pankaj.gupta.linux@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lirongqing@baidu.com \
    --cc=mgorman@suse.de \
    --cc=mika.penttila@gmail.com \
    --cc=mingo@redhat.com \
    --cc=pbonzini@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).