Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp237683pxb; Thu, 30 Sep 2021 05:09:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4ejTI2ls6wfMM7HO2QTHHO0bVU0weQAw4XNWtXxaNBI2zepnDv0YCruarC2KekPX7QwJI X-Received: by 2002:a50:cf41:: with SMTP id d1mr6645046edk.219.1633003784161; Thu, 30 Sep 2021 05:09:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633003784; cv=none; d=google.com; s=arc-20160816; b=B5a4Q3GFHTBoCLg3m7LsmxtHfLhvZvnf0pvluBaFHXUw1L6feIj2KS/Oc7ouhIL6GV 4/DOFJkMlCT89UvTFX9dhUHchFVocsekMsHuhHbqhxZmF99WiTEYRSaG71/WXq9cUoH/ fE8ZgwNJCfy3Bo+o4m/iDc7npF4ouHQIsS2XG4i8mRfcvWBwD/JM+baD06a0Scd0rdS8 vobxuYlixmD9d0S2hW9YghY9ZB2TVp2SGbkHEOYS3dXVcQcsynTctPfjMIrsKnJX4dam 9utQJN2+ZbzhPIkM6sV9404qqLfcyFa+VMMLHJC9zatdxhEUxFGp8DAr6btYLI6aarzT WGLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject; bh=rBexLorXCHZsgRnVjbJRR8VDYr50+ciAf03pW+1fC/M=; b=qoqVER4us1PXg4R4ppMZVbXJ2DAg7EQhib7J+4IEa40BmgZ3zG69p5tJ8xXsbxtZ1l S1aI0dgt2LokDOBJ2XrlSqKk0EgmzlNmDRD0Lk7P6cLxs6l67lm4r1WaTXFKT8RTOx3v 3hh0NQ7oYOCPC9z7fNPsvLb4nl9DfCJkWN08h6iKmDYM54QK7jdSqANcnGQHyL3HcUdo zyrNglIGBMdOmLuTX+ZCyWLf5E5XQT0McgXp+8bh7oBwon149uGdm40G4EZH3K4e3fso ybQxMGJHPKqGJnZJW6ygYi/5zTD0Xjaqf9+NkolqK7ElFkclJiMbL66Y/1ws1TzzmVh6 YUig== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r24si3954089ejy.194.2021.09.30.05.08.48; Thu, 30 Sep 2021 05:09:44 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348604AbhI3IgA (ORCPT + 99 others); Thu, 30 Sep 2021 04:36:00 -0400 Received: from foss.arm.com ([217.140.110.172]:50450 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348460AbhI3IgA (ORCPT ); Thu, 30 Sep 2021 04:36:00 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7D4A5D6E; Thu, 30 Sep 2021 01:34:17 -0700 (PDT) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C83BF3F70D; Thu, 30 Sep 2021 01:34:16 -0700 (PDT) Subject: Re: [PATCH] sched/fair: Drop the redundant setting of recent_used_cpu To: Li RongQing , linux-kernel@vger.kernel.org, mingo@redhat.com, peterz@infradead.org References: <1632985154-12890-1-git-send-email-lirongqing@baidu.com> From: Dietmar Eggemann Message-ID: Date: Thu, 30 Sep 2021 10:34:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <1632985154-12890-1-git-send-email-lirongqing@baidu.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/09/2021 08:59, Li RongQing wrote: > 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 > Looks like this has been already fixed in: https://lore.kernel.org/r/20210928103544.27489-1-vincent.guittot@linaro.org