Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp473790pxu; Fri, 4 Dec 2020 07:45:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxk+yULu1E2nSPWJM0KIFKM7CKYxdc/0RhM7TJ/7ExXrWkmgnqFfB9nnrNBIiOHVbL3y2KP X-Received: by 2002:a50:ee97:: with SMTP id f23mr7869122edr.311.1607096728572; Fri, 04 Dec 2020 07:45:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607096728; cv=none; d=google.com; s=arc-20160816; b=S9iNOa/HFnm4EvT+l1tqkvnj9mjbxzbrGKfXGgSuPSJxdBW/Ujpzis6QvCWpp8BYwE zK1r6SdzlKIbfX6P/jQTosA+rFf8amemBhhVp89XGlAQOZ5kt1DOQqB/gHmUPak9PX5f pSq3FGU61VE3Mv0FBkOzEL9rSKc/R2e6TeEA6bOOhdWFEqCZeh8y1WKT1DqxHg7UB2us rvZQzD1eayDsWIaVWMinEoM1q2FPC28zR0guEJfFAAewIasSykBuEK0izx4VdpqQDZzT shtXguBvd3e5amXfFoExfXVNbypdow+0GqYXOKCC2FhU9GyxPe4XSOm1dtpIjAxF/2tk lJcA== 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=/hSs7iyBCNfsOgBi/S4FtxJY2RFXaiPm7DJLGGT07uM=; b=pqWGVHCDQbu4dL2HTe793FW3rihpIq/rD8ZaxxcGN9OkUumvTAkWSaK8WXI89fQ916 M6K4XgdfIeV2gyEP35b0k4zkWXmvjGY0CYzrx8IvHFMxYbzhV+MBliEcaTLkzYIsm5Wx 7INMR5fWnr3O4mY/3AzhTnmrcRIaKDJC7Oyu+03uaRGVqH/4npUXBMoX0lW9O+PpSWrk 3895Rb/uKm3sdiH14v5Ilh3ml5npVRWYslzfccUs+ZsIGzDpFzjmyKQH9BscyutvEiaS Hq30+HnYTvZCgo/8PW5wLzLmfpheZcxLbDAWiTtVbkA+8bb7wWbMF5pEyOjdWT/AGI7S yXug== 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 hr23si1596288ejc.111.2020.12.04.07.45.05; Fri, 04 Dec 2020 07:45:28 -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 S1728950AbgLDPlX (ORCPT + 99 others); Fri, 4 Dec 2020 10:41:23 -0500 Received: from outbound-smtp31.blacknight.com ([81.17.249.62]:44885 "EHLO outbound-smtp31.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727125AbgLDPlX (ORCPT ); Fri, 4 Dec 2020 10:41:23 -0500 Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp31.blacknight.com (Postfix) with ESMTPS id 05DF8C0DFA for ; Fri, 4 Dec 2020 15:40:31 +0000 (GMT) Received: (qmail 5873 invoked from network); 4 Dec 2020 15:40:30 -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); 4 Dec 2020 15:40:30 -0000 Date: Fri, 4 Dec 2020 15:40:29 +0000 From: Mel Gorman To: Vincent Guittot Cc: "Li, Aubrey" , LKML , Barry Song , Ingo Molnar , Peter Ziljstra , Juri Lelli , Valentin Schneider , Linux-ARM Subject: Re: [PATCH 06/10] sched/fair: Clear the target CPU from the cpumask of CPUs searched Message-ID: <20201204154029.GC3371@techsingularity.net> References: <20201203175204.GY3371@techsingularity.net> <20201204113030.GZ3371@techsingularity.net> <3d8a6d19-afac-dc93-127d-da6505402cdf@linux.intel.com> <20201204143115.GB3371@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 04, 2020 at 04:23:48PM +0100, Vincent Guittot wrote: > On Fri, 4 Dec 2020 at 15:31, Mel Gorman wrote: > > > > On Fri, Dec 04, 2020 at 02:47:48PM +0100, Vincent Guittot wrote: > > > > IIUC, select_idle_core and select_idle_cpu share the same cpumask(select_idle_mask)? > > > > If the target's sibling is removed from select_idle_mask from select_idle_core(), > > > > select_idle_cpu() will lose the chance to pick it up? > > > > > > This is only relevant for patch 10 which is not to be included IIUC > > > what mel said in cover letter : "Patches 9 and 10 are stupid in the > > > context of this series." > > > > > > > Patch 10 was stupid in the context of the prototype because > > select_idle_core always returned a CPU. A variation ended up being > > reintroduced at the end of the Series Yet To Be Posted so that SMT siblings > > are cleared during select_idle_core() but select_idle_cpu() still has a > > mask with unvisited CPUs to consider if no idle cores are found. > > > > As far as I know, this would still be compatible with Aubrey's idle > > cpu mask as long as it's visited and cleared between select_idle_core > > and select_idle_cpu. It relaxes the contraints on Aubrey to some extent > > because the idle cpu mask would be a hint so if the information is out > > of date, an idle cpu may still be found the normal way. > > But even without patch 10, just replacing sched_domain_span(sd) by > sds_idle_cpus(sd->shared) will ensure that sis loops only on cpus that > get a chance to be idle so select_idle_core is likely to return an > idle_candidate > Yes but if the idle mask is out of date for any reason then idle CPUs might be missed -- hence the intent to maintain a mask of CPUs visited and use the idle cpu mask as a hint to prioritise CPUs that are likely idle but fall back to a normal scan if none of the "idle cpu mask" CPUs are actually idle. -- Mel Gorman SUSE Labs