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 28F20C4361B for ; Tue, 8 Dec 2020 11:03:59 +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 A00DC2072C for ; Tue, 8 Dec 2020 11:03:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A00DC2072C 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=UzrlWBJBwtn44Cwm1Cqaay6n0nxums1YQEKEauZEibs=; b=Len3u8PspLJGshmbjgerKY4vH x4i/oRXsFvhIwDlfs3OlRAeHHggzx0v6V59POhzwzF+109ldFp6evcjkxKaAN3h968JaFFXa+VL2/ j2jT0w9MfNFdExO+oBx2nrCPUkaleDZE/KOjI5E3gGz4AaTFhN3A1LO9BSlX/zqR27CBtBzZ0Fa7C Y4bGl86tkgqa0w6xChs1J0X0L4uoV/lPtZG4vdODNqMygQGiwDU1oRA3KmunKvlfmqshAhHFQ+3GH tAYCB3HE+itOOmnaaDaFYWiG8txSI8lv4gsuE9sAg0LySLfVd0B9tf4Lm2uun5RUvTlyyCxwpE475 xASc80DqA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmalg-0005cg-GJ; Tue, 08 Dec 2020 11:02:52 +0000 Received: from outbound-smtp55.blacknight.com ([46.22.136.239]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmalc-0005ai-Kk for linux-arm-kernel@lists.infradead.org; Tue, 08 Dec 2020 11:02:50 +0000 Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp55.blacknight.com (Postfix) with ESMTPS id A5A6BFABCB for ; Tue, 8 Dec 2020 11:02:46 +0000 (GMT) Received: (qmail 24492 invoked from network); 8 Dec 2020 11:02:46 -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); 8 Dec 2020 11:02:46 -0000 Date: Tue, 8 Dec 2020 11:02:44 +0000 From: Mel Gorman To: Dietmar Eggemann Subject: Re: [PATCH 2/4] sched/fair: Do not replace recent_used_cpu with the new target Message-ID: <20201208110244.GH3371@techsingularity.net> References: <20201207091516.24683-1-mgorman@techsingularity.net> <20201207091516.24683-3-mgorman@techsingularity.net> <842ef1db-49d1-7d05-997b-1562383cdd28@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <842ef1db-49d1-7d05-997b-1562383cdd28@arm.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-20201208_060248_835515_783E9B2C X-CRM114-Status: GOOD ( 16.74 ) 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: Barry Song , Juri Lelli , 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, Dec 08, 2020 at 10:57:29AM +0100, Dietmar Eggemann wrote: > On 07/12/2020 10:15, Mel Gorman wrote: > > After select_idle_sibling, p->recent_used_cpu is set to the > > new target. However on the next wakeup, prev will be the same as > > I'm confused here. Isn't current->recent_used_cpu set to 'cpu = > smp_processor_id()' after sis()? Looking at v5.10-rc6. If you are referring to this; if (want_affine) current->recent_used_cpu = cpu; then it gets removed by the path. That replaces recent_used_cpu with the wakers CPU which still works but the hit rate is lower. > > [...] > > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index 23934dbac635..01b38fc17bca 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -6274,6 +6274,7 @@ 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) && > > p->recent_used_cpu is already set to prev in this if condition. > That can be removed as redundant, I'll fix it. -- Mel Gorman SUSE Labs _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel