Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp475757pxu; Fri, 4 Dec 2020 07:48:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJnGw18NHt723pfqO0LBvu/iHEYLxhsGO44o8UyK97NyPQ4Fv9n2DQ/tfhfkavJ6zmQgTj X-Received: by 2002:a17:906:d72:: with SMTP id s18mr7801325ejh.110.1607096899089; Fri, 04 Dec 2020 07:48:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607096899; cv=none; d=google.com; s=arc-20160816; b=Piy2/1bRA5g3S0Yt3O1q77crAIDalB2/51CunFVt0YW00DHm2ZntITmBRcguSTbd9x yV32vSI9tq30j5Fl86dQs7Henfjmb27JwtJisT4brEfNhwqWkJtzh+POxJOrVILI3Us6 blQeb6uUCRQR7rwB6nB/4kVnIfWwuiK2KdZhcGz15tFi+Gmg2cgryF2YmXOjJUNV88lY AiBFjyc2eiS4BEn0BD1J1a/qvg02+SogdlV+IwPDwSXOmo24OZBGlyGZo51NbKXbA9nT t5+DCl7Y4I8ebh1Up/GlP6ABZX6ybNrWir3pnx6EKkPU8tZfD1dm6ITCLDmMCgxHOgIc ZFtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=H8Wxg7BjSla33ZJgJ/hXpUqDeZ12y5ojbtdcdfbU0ZU=; b=w8XY5kiBjpGWOs1vYs7SZ3knOZpEGR+ppzLlhBBLEgkWcZ4m3OO9A+SA+/IWVSrh+H AdsxqageNRCfq/sxNk+JXEHbbMq07dZcbthGPb2pcwl/rNn/An995cc81fiQZiDScEug gv0qkiCXpCfbNx5QghNByKk7aRNGvhLQdVQqVuzl5G8TLYwnW/TzaOxCZSvZA2cInStX dpDd97EyiPQWDuVqMuOG3blGF40bVjjwRyzYj41e6Id71Uyg3OW1cJFr2WLUX0WoBlSJ w/bx+KQimmKoLSmGuDOzn6GcbsmmVK49zRx2lsvnuR+wrUB0et00Gvrog7Vp2D055QXs sxkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FR+YiOMm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cd2si1565568ejb.215.2020.12.04.07.47.56; Fri, 04 Dec 2020 07:48:19 -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; dkim=pass header.i=@linaro.org header.s=google header.b=FR+YiOMm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727347AbgLDPoJ (ORCPT + 99 others); Fri, 4 Dec 2020 10:44:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725987AbgLDPoI (ORCPT ); Fri, 4 Dec 2020 10:44:08 -0500 Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E96F7C0613D1 for ; Fri, 4 Dec 2020 07:43:22 -0800 (PST) Received: by mail-oi1-x244.google.com with SMTP id o25so6587413oie.5 for ; Fri, 04 Dec 2020 07:43:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=H8Wxg7BjSla33ZJgJ/hXpUqDeZ12y5ojbtdcdfbU0ZU=; b=FR+YiOMm83Dae4nm2208tDt2NFi/tGIzV2MR1lhUpCMckqgnJ+D5UVbiq/r6eub2TT a8+COkF6homTMy7vcApzJtBSmgK4e5qpEGZcEUIMoOR1psJ8qcQg1GzWzYEqw86cW9yb /3jiiIzK96zG1Qt5RUSqVuycM/KJn9lBn1jrjXdZmJphF4rQHx7ItpaEWQ7o5LO/wyUa 3pZlYnwpIzrno8jN95t4jbsYsmgnNGWnhLfsepontyDzY7046xNfzdSa08ZyjXq60Z29 SQBCuXMEGTqsjlrqw56C6ZxiV7GJoC68E6CJOq16NIaEpZ1sNSAi/TsD5xaoWIz0OaHG osdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=H8Wxg7BjSla33ZJgJ/hXpUqDeZ12y5ojbtdcdfbU0ZU=; b=VEPEJThzP7kmvOPqVLoQBXZfLHq1qk1V40NmRe737cZAIGUyRDNGdcpTGNO9adberN EexJ7OUID2/89MEY/o9xG5XDlTOGNdEl3sxRzHTlZHUvdDVNQMSxqkKtkY/XqgockYnC qZ3zGO/S96jLkYTFr8vWvKHlwIe3h7C9fQmLn50SkZoG7lRbGTVwoN5ZCmZ6QoNR1uGh eJ6dMc8F1xudNTNPcBQViNjBqaxG04vSE5UVTBjqxOJ4FZdNkzI9FXb7THvBe2KxEmhO Ml5Jd2AlWz2PgZQ5q+KgneARAtR0AuK7bw3aeKRve2EkFjVXhC50GtBgFbqh0wIfVUis f6GA== X-Gm-Message-State: AOAM533hyZeVnZAfEQE/ZqBqNmzBkF6RcWxHG/8E3VYxfDBDh/xM7tpF yUndFt3mcDMSX50mZMjHhVyyqBB81lVS0Ba37mQxPA== X-Received: by 2002:aca:a8d4:: with SMTP id r203mr3628839oie.3.1607096598862; Fri, 04 Dec 2020 07:43:18 -0800 (PST) MIME-Version: 1.0 References: <20201203175204.GY3371@techsingularity.net> <20201204113030.GZ3371@techsingularity.net> <3d8a6d19-afac-dc93-127d-da6505402cdf@linux.intel.com> <20201204143115.GB3371@techsingularity.net> <20201204154029.GC3371@techsingularity.net> In-Reply-To: <20201204154029.GC3371@techsingularity.net> From: Vincent Guittot Date: Fri, 4 Dec 2020 16:43:05 +0100 Message-ID: Subject: Re: [PATCH 06/10] sched/fair: Clear the target CPU from the cpumask of CPUs searched To: Mel Gorman Cc: "Li, Aubrey" , LKML , Barry Song , Ingo Molnar , Peter Ziljstra , Juri Lelli , Valentin Schneider , Linux-ARM Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 4 Dec 2020 at 16:40, Mel Gorman wrote: > > 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 In fact it's the opposite, a cpu in idle mask might not be idle but all cpus that enter idle will be set > 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