mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Li RongQing <lirongqing@baidu.com>
To: linux-kernel@vger.kernel.org, lirongqing@baidu.com,
	mingo@redhat.com, peterz@infradead.org
Subject: [PATCH] sched/fair: Drop the redundant setting of recent_used_cpu
Date: Thu, 30 Sep 2021 14:59:14 +0800	[thread overview]
Message-ID: <1632985154-12890-1-git-send-email-lirongqing@baidu.com> (raw)

recent_used_cpu has been set to prev before check

Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 kernel/sched/fair.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 7b9fe8c..ec42eaa 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6437,14 +6437,8 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target)
 	    cpus_share_cache(recent_used_cpu, target) &&
 	    (available_idle_cpu(recent_used_cpu) || sched_idle_cpu(recent_used_cpu)) &&
 	    cpumask_test_cpu(p->recent_used_cpu, p->cpus_ptr) &&
-	    asym_fits_capacity(task_util, recent_used_cpu)) {
-		/*
-		 * Replace recent_used_cpu with prev as it is a potential
-		 * candidate for the next wake:
-		 */
-		p->recent_used_cpu = prev;
+	    asym_fits_capacity(task_util, recent_used_cpu))
 		return recent_used_cpu;
-	}
 
 	/*
 	 * For asymmetric CPU capacity systems, our domain of interest is
-- 
1.7.1


             reply	other threads:[~2021-09-30  7:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30  6:59 Li RongQing [this message]
2021-09-30  8:34 ` Dietmar Eggemann

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=1632985154-12890-1-git-send-email-lirongqing@baidu.com \
    --to=lirongqing@baidu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®