Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD66BC4361B for ; Fri, 11 Dec 2020 06:29:36 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5E2A323ECF for ; Fri, 11 Dec 2020 06:29:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5E2A323ECF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/WKr2CeRgsAJg5QG7QG341vglx9Qtq4LGsfhsqgW6+8=; b=wdVwrLbm1/QG5vbOiWo2g+oRY fcrC2mxcBbpRE3sCDH9aLrro8Dec8tmrx9uw91N9kovqTG23a5jS1S8AgGYcUsWSwtDh6IPqbHAhC Ytr4jvLJVdYlmiNr2gfIlfSPnT/GiNDsp/8U7qZbHKZBhxrts6a/OvlbWvfrJ3MI5V3WsABcOGRFT RFO4jpY/yksNaQpWnpdSgStnUvkDk0SQL0fibrxHHuGHmpDeDd5Bxc5EUqVdlpZzTDhXVviPPoXBS yvuoyiBpAU8usGqcpPHDMz7jjwJ6ehckU2RzPKZCN686A2asI9BPaVOvyhjhDJ+WXgDL1Uq74qKl6 z4Fa8NY2w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1knbt5-00077S-QO; Fri, 11 Dec 2020 06:26:43 +0000 Received: from mail3-164.sinamail.sina.com.cn ([202.108.3.164]) by merlin.infradead.org with smtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1knbsl-00075d-Go for linux-arm-kernel@lists.infradead.org; Fri, 11 Dec 2020 06:26:26 +0000 Received: from unknown (HELO localhost.localdomain)([103.193.190.174]) by sina.com with ESMTP id 5FD310ED000170A1; Fri, 11 Dec 2020 14:25:51 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com X-SMAIL-MID: 18895915073552 From: Hillf Danton To: Mel Gorman Subject: Re: [PATCH 3/4] sched/fair: Do not replace recent_used_cpu with the new target Date: Fri, 11 Dec 2020 14:25:42 +0800 Message-Id: <20201211062542.3082-1-hdanton@sina.com> In-Reply-To: <20201208153501.1467-4-mgorman@techsingularity.net> References: <20201208153501.1467-1-mgorman@techsingularity.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201211_012623_920837_BE90C420 X-CRM114-Status: GOOD ( 10.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juri Lelli , Barry Song , Vincent Guittot , Peter Ziljstra , Aubrey Li , LKML , Ingo Molnar , Valentin Schneider , Linux-ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 8 Dec 2020 15:35:00 +0000 Mel Gorman wrote: > @@ -6277,17 +6277,13 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target) > > /* Check a recently used CPU as a potential idle candidate: */ > recent_used_cpu = p->recent_used_cpu; > + p->recent_used_cpu = prev; > if (recent_used_cpu != prev && > recent_used_cpu != 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) && Typo? Fix it in spin if so. > 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; > return recent_used_cpu; I prefer to update the recent CPU after llc check. > } > > @@ -6768,9 +6764,6 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int wake_flags) > } else if (wake_flags & WF_TTWU) { /* XXX always ? */ > /* Fast path */ > new_cpu = select_idle_sibling(p, prev_cpu, new_cpu); > - > - if (want_affine) > - current->recent_used_cpu = cpu; > } > rcu_read_unlock(); > > -- > 2.26.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel