From mboxrd@z Thu Jan 1 00:00:00 1970 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=-10.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 A0CC1C4361B for ; Fri, 11 Dec 2020 09:03:47 +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 378A823F35 for ; Fri, 11 Dec 2020 09:03:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 378A823F35 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net 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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vRbMZOAUsmZ3wjbEWZ5wykLvB5cRAUa0WSCtjMDV71k=; b=qmO3mVtic+PJVPNdzfuOBgq/V LMvQi4M7uLUZfpccOinLZFIkyttTOFITE2o8qfl5JqHsZ/+QbMF8x11WzITsqZaJYrbhFupKumlb3 3Cop+1Iw28yO82RPO2RZZaal4TZYVpzJPAGjW80+iqdV6uIk0Aa4jcPD19wO5AhPcEKm5qQLlQQMV kEUem8bw9ArPWKHc5Ur/C9zN2XzmmCvMjriP5ei7/G8bZvq/jlwI9winB6vT2L2j7dAhz45FFVt+5 8c9ldmTRFQU+h4wi59stmN8v1+RXdigKCZJrvDqXuNmrzWfUudLTz5s0RhAeX2xwPAbGEnnf1RT0b 8ROdi6uRw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kneJv-0005Nf-Kc; Fri, 11 Dec 2020 09:02:35 +0000 Received: from outbound-smtp11.blacknight.com ([46.22.139.106]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kneJs-0005Mt-9f for linux-arm-kernel@lists.infradead.org; Fri, 11 Dec 2020 09:02:33 +0000 Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp11.blacknight.com (Postfix) with ESMTPS id 15D1D1C3C0F for ; Fri, 11 Dec 2020 09:02:30 +0000 (GMT) Received: (qmail 24518 invoked from network); 11 Dec 2020 09:02:29 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.22.4]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 11 Dec 2020 09:02:29 -0000 Date: Fri, 11 Dec 2020 09:02:28 +0000 From: Mel Gorman To: Hillf Danton Subject: Re: [PATCH 3/4] sched/fair: Do not replace recent_used_cpu with the new target Message-ID: <20201211090228.GU3371@techsingularity.net> References: <20201208153501.1467-1-mgorman@techsingularity.net> <20201211062542.3082-1-hdanton@sina.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201211062542.3082-1-hdanton@sina.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201211_040232_458568_C66F8882 X-CRM114-Status: GOOD ( 13.58 ) 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 Fri, Dec 11, 2020 at 02:25:42PM +0800, Hillf Danton wrote: > 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. > What typo? > > 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. > That would prevent recent_used_cpu leaving the LLC the task first started on. -- Mel Gorman SUSE Labs _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel