public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: mika.penttila@gmail.com
Cc: linux-kernel@vger.kernel.org, lirongqing@baidu.com,
	pbonzini@redhat.com, mingo@redhat.com, kvm@vger.kernel.org,
	Mel Gorman <mgorman@suse.de>
Subject: Re: [PATCH] is_core_idle() is using a wrong variable
Date: Wed, 28 Jul 2021 12:41:03 +0200	[thread overview]
Message-ID: <YQE0P9PLd3Uib7eu@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20210722063946.28951-1-mika.penttila@gmail.com>

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

  reply	other threads:[~2021-07-28 10:43 UTC|newest]

Thread overview: 4+ 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 [this message]
2021-07-28 11:50   ` Mel Gorman
2021-07-29  4:26   ` Pankaj Gupta

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=YQE0P9PLd3Uib7eu@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --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 \
    /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