Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp365035pxu; Fri, 4 Dec 2020 05:22:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJzCkmiPW8N5ErGLvVmuY4c9lLFZrF30aLHfap9jtBvZE1632Mk9Qn6GVi7OG05sUkEyxnTV X-Received: by 2002:a17:906:2857:: with SMTP id s23mr6985560ejc.218.1607088135647; Fri, 04 Dec 2020 05:22:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607088135; cv=none; d=google.com; s=arc-20160816; b=Vx4JxVXCyeslEo8MznmZJ+wxu6u5YcRd4KsLlekIQTtMtyPqb0KCUKOR6mxyJibJC/ 89yjMwl24BAzmBTFA49AK7AmIRAF4Kh79x+GNy28x354hOHqjD875o0hYybxDtQIGF1g R4xTgfmwYP8qenBa/N7PwzFUz3cWDaeJ9rBuU2ViMRONklP9heko6w26mDto7z5H4YPw hMW0n8Amca39A8ur3K8hRLlxrr9jTeuK1STgPf+rFDN9HpFZqf764e5zyqRYhg8plB6L DQzyTad4a91EBGRMbb1ukhK7e5bxXVT+rGTdh4DrfMUysYTPrPS1mXXvl6MQpwYEEZ8X 8B0g== 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=XgYMArn7S4eAe6KIOy5zLeLGQU/k2A4+qSnIEryVFDA=; b=PH9Y4dqg+hPuARFfKYbmheFcHp/gCAbqeMMPcX67saJTyup93opDvbkuHHLOEsJgB+ wwqS3c0RTjI4O2t5UKySXxJk0AmX0pIqOyKrQLIIdSS2NKNt8h8F90NisFcPcCfGUaDH inRsRDGU2OA/etJGt3X0AoW7uLeaGQKafIbqeLRZx55mQXg6SBeAxVsB12Jg0Vt20hKZ FnJQDorNhCvOYCgQIF0kd+zBkgR3wV1mwaMjsQZw8nrXRXcNlef1FKfezwIRF3uWE5LZ kHDxtiy94+mrrdoGNu1w+TRMPdUZlQB1JKWncmSO4RFV9FOR0qWBRLVvnBLge5vnO9j+ RA2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WX3rrUEh; 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 b5si2939083edk.293.2020.12.04.05.21.50; Fri, 04 Dec 2020 05:22:15 -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=WX3rrUEh; 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 S1728754AbgLDNSU (ORCPT + 99 others); Fri, 4 Dec 2020 08:18:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726432AbgLDNST (ORCPT ); Fri, 4 Dec 2020 08:18:19 -0500 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79F48C0613D1 for ; Fri, 4 Dec 2020 05:17:33 -0800 (PST) Received: by mail-lf1-x144.google.com with SMTP id s27so7578936lfp.5 for ; Fri, 04 Dec 2020 05:17:33 -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=XgYMArn7S4eAe6KIOy5zLeLGQU/k2A4+qSnIEryVFDA=; b=WX3rrUEh7571qNcIktMgb1K6LZGWbAebA/LuCyu5g6ymMVvKppH/Of5IsUS0W0+PUp QZdIegCUbTjLbuyoqiGn0k1TY2u+st6pnZAwAl4nBiSgFJYPeAGxfkPLvhQjfXzv3yB3 W1MBB6hMrtdHuai0IhoEPquK1yrQdzEat20Tw64aXtfuBWzgRldlnfrgZ7rHyf/Oh+mG 0GwxXFnVdhSJiCotmogChuMkIrX0sDUpgf0INQZQ+vA0QvBMQS6xaVaOp3mwkW4BM+DL 6zO4eGdFF4OZXNS4x1x+ZE7B202/1HhU/23jbAqlOBDszhPO8b2ETv8oz8ojqtNEThWa pVuQ== 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=XgYMArn7S4eAe6KIOy5zLeLGQU/k2A4+qSnIEryVFDA=; b=FuSN+vhCXV5iqWLsbVn8cZOHpf8Ik/T7AnQOURUW2vwT6y53tZpert0W6AMuVAtfTV BdN3qK47kpgqiXKNkdv3f/XEoD87DRJOxikxm2fLI63NncxgwkuePRI1NLpqT2jJ+iR5 5wvZkrG4HbT3M0OGEZ1GIGbnfJebEZ6uGn4AYGgE0GbiuLJ+wUrFrf30ZIPS8mwYcniw fNJDuc0j2k4M17lR2mBUbSgBCwgF+QBzj8ioh0k88Zm4xnOuG0Wp0nWhgS+QxS4iYqRD M7kz9IBXbPMEhK9nDU7+6Dbr4DIT1rX4MviGYIdqzVt0088CIlMx0s5ZBAEF/xN+oXjP jtvg== X-Gm-Message-State: AOAM530cug1ruBhM25eehdGVLty8ClYzM+zyLTEAKAKW9rwucIFmyqNS zNPTM1ng3jKpNAGDGcTdosomS2htcoCmLM3LU4GWIw== X-Received: by 2002:a19:cc91:: with SMTP id c139mr3563961lfg.31.1607087851964; Fri, 04 Dec 2020 05:17:31 -0800 (PST) MIME-Version: 1.0 References: <20201203141124.7391-1-mgorman@techsingularity.net> <20201203141124.7391-7-mgorman@techsingularity.net> <20201203175204.GY3371@techsingularity.net> <20201204113030.GZ3371@techsingularity.net> In-Reply-To: From: Vincent Guittot Date: Fri, 4 Dec 2020 14:17:20 +0100 Message-ID: Subject: Re: [PATCH 06/10] sched/fair: Clear the target CPU from the cpumask of CPUs searched To: Mel Gorman Cc: LKML , Aubrey Li , 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 14:13, Vincent Guittot wrote: > > On Fri, 4 Dec 2020 at 12:30, Mel Gorman wrote: > > > > On Fri, Dec 04, 2020 at 11:56:36AM +0100, Vincent Guittot wrote: > > > > The intent was that the sibling might still be an idle candidate. In > > > > the current draft of the series, I do not even clear this so that the > > > > SMT sibling is considered as an idle candidate. The reasoning is that if > > > > there are no idle cores then an SMT sibling of the target is as good an > > > > idle CPU to select as any. > > > > > > Isn't the purpose of select_idle_smt ? > > > > > > > Only in part. > > > > > select_idle_core() looks for an idle core and opportunistically saves > > > an idle CPU candidate to skip select_idle_cpu. In this case this is > > > useless loops for select_idle_core() because we are sure that the core > > > is not idle > > > > > > > If select_idle_core() finds an idle candidate other than the sibling, > > it'll use it if there is no idle core -- it picks a busy sibling based > > on a linear walk of the cpumask. Similarly, select_idle_cpu() is not > > My point is that it's a waste of time to loop the sibling cpus of > target in select_idle_core because it will not help to find an idle > core. The sibling cpus will then be check either by select_idle_cpu > of select_idle_smt also, while looping the cpumask, the sibling cpus of not idle cpu are removed and will not be check > > > guaranteed to scan the sibling first (ordering) or even reach the sibling > > (throttling). select_idle_smt() is a last-ditch effort. > > > > -- > > Mel Gorman > > SUSE Labs