Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp39597pxb; Thu, 30 Sep 2021 00:09:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFZJaf6oka2/18vjbYmw/E+M8Wy6ULWJH++IV6v7H1PKb8DRt6oODZ6sG119SyER88yGfd X-Received: by 2002:a17:902:6e0f:b0:13c:9d43:7d7a with SMTP id u15-20020a1709026e0f00b0013c9d437d7amr2697871plk.62.1632985778900; Thu, 30 Sep 2021 00:09:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632985778; cv=none; d=google.com; s=arc-20160816; b=I9oGjTk1xHTYr9fkQAuGomGNeNTLP9ARCtzAq7IVcQFHI+jF5iY+DPNUzsts9BteaT cBTSimXsOyZnjC2A52iIn46zcsEX8J3Tr3snT7HiqBH3tVltG6NM3RXuFJKqF8dAT584 DoOxT82u9xlvMSxG79v3gO/441l40ayQjjtaW6yLI5fMA6+RebhaIEkC6v1zIFnSD8DL tiAuBtRarXh3YoWwkPrOFwtmti4Tr5bmZ6Pl94r+Zkbl0erY8S2f4yTA16QlJ5Cty1YJ 6bMCgtrzEJtA7/rXWgBYJ8FuNVSObfZsOeew7IAiKdWddBNeMJ9g/ejw3n20mlu6Z8RD h15Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:to:from; bh=oyBRrWpniik1h2Eetx6casXMwbPT+0zpXkmcmyzgK0g=; b=iY4jqUwVP5XfWhezLURbM/YUzI9BMMCrsDvit7o2lk6+VSr8s0mlbuPqUyD0oYhGkO III0RTNKDISSxpNJJg7/58ZTFnDsoqoy6CoqKMOZ7r/s5S4okwjAMwvk6hpqmuwyY0Rj EjUIJB/ypllzGmiZc+TeoQqQ4a8gqyM96vy+IxqgPvfuRANNK2Ygh4LU0/VC5RcluIRu rtE0MV6PaRwd9RCYP81pNAxdWtT9x9wvG0QLotwVRSFHMgARjOZSxSgIzZzyTrp4ORKJ kx6Tjf8KL8G0OQtsf9nkVYEKGIgxnhzV4mG3rkU4mz5TKuIkjVg8jrdtdVFLESiUY3tT F8Jg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h4si2504321pgp.162.2021.09.30.00.09.24; Thu, 30 Sep 2021 00:09:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348495AbhI3HHl (ORCPT + 99 others); Thu, 30 Sep 2021 03:07:41 -0400 Received: from mx316.baidu.com ([180.101.52.236]:48528 "EHLO njjs-sys-mailin05.njjs.baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233661AbhI3HHl (ORCPT ); Thu, 30 Sep 2021 03:07:41 -0400 X-Greylist: delayed 401 seconds by postgrey-1.27 at vger.kernel.org; Thu, 30 Sep 2021 03:07:40 EDT Received: from bjhw-sys-rpm015653cc5.bjhw.baidu.com (bjhw-sys-rpm015653cc5.bjhw.baidu.com [10.227.53.39]) by njjs-sys-mailin05.njjs.baidu.com (Postfix) with ESMTP id 32270CF80045; Thu, 30 Sep 2021 14:59:14 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by bjhw-sys-rpm015653cc5.bjhw.baidu.com (Postfix) with ESMTP id 14E46D9932; Thu, 30 Sep 2021 14:59:14 +0800 (CST) From: Li RongQing 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 Message-Id: <1632985154-12890-1-git-send-email-lirongqing@baidu.com> X-Mailer: git-send-email 1.7.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org recent_used_cpu has been set to prev before check Signed-off-by: Li RongQing --- 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