Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1120788pxu; Sat, 12 Dec 2020 02:47:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJzAJ2beP8omb9TWHZXhNjcMYlhLKRETc5cTe8gAPggtlCxyzxc+OfMaS6zroi2f1HUW7IlL X-Received: by 2002:aa7:c919:: with SMTP id b25mr15616286edt.108.1607770040106; Sat, 12 Dec 2020 02:47:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607770040; cv=none; d=google.com; s=arc-20160816; b=vyWlAuX4eww1W55godUw2vtR1S0jSpRC8b2rMVBXhu4k9XBVCEKziWjREhnw4tGVy8 P+9XtRKZigTCCBcVilYKGjRKKlGr9VbY8JB3v1+fS50PQl41jBUOldq4QMaTPtvxrBZk bG7qRSiHO38kXRDvmv7VP4t4t5r9gvuv9eSUSNzj1QFWDaqy3OyhbNL0N9DFTlxjwa8e afzkrgy7rWZK3/vC77LpdtaaBTLVePtdB+vHHypyTBgMYlRenuZ3LIoNVQOHXw6D5SuF EKOjdlHL1kFZAMMHXsOvq8/ZI3FTqsio1eDmGhxU/gFNZIhlozTAkORsVSaDgyqyvHFx OrEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=UxGvz/+orZXZRA/RuXtz3GewpTU7on0zyTMllg8Arqg=; b=EWfaoIT78i2to/ziL0JO/mNq1HHHafLUbTWjl6Sxh6WS0lRM+HvnlheU7RpkhJUbX7 76gZdUpFFLvs48tkq5rkU3Zy/QQ2vWaoQvHGrPTZwwDicHZc9ojlygTnNK7I5znhqWBE qVSyjpL1VPFi+QOg78OlXA9oEAFkE7YMOOqRWT8GZ7/YUoum0Um2dMZU/sEJtOkz8FqT wb0ByjX/ewneIZwFafQEXkEx5fjw/IC47Twum433inCy4snGwFSjfhkT9kL6XC1yBGor jv2ArYUnlTQmBfasW3/QrjC9dJFnUpN3dxMdRF1httPsNLKVaXSyAh+8zKAmZ2oxIQS4 FHsg== 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 a8si7157043ejx.247.2020.12.12.02.46.57; Sat, 12 Dec 2020 02:47:20 -0800 (PST) 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 S2437173AbgLKJD2 (ORCPT + 99 others); Fri, 11 Dec 2020 04:03:28 -0500 Received: from outbound-smtp44.blacknight.com ([46.22.136.52]:45763 "EHLO outbound-smtp44.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437179AbgLKJDW (ORCPT ); Fri, 11 Dec 2020 04:03:22 -0500 Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp44.blacknight.com (Postfix) with ESMTPS id 0D8C3F842B 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 Cc: Peter Ziljstra , Ingo Molnar , LKML , Aubrey Li , Barry Song , Juri Lelli , Vincent Guittot , Valentin Schneider , Linux-ARM 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-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20201211062542.3082-1-hdanton@sina.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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