Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp361296pxu; Fri, 4 Dec 2020 05:17:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJys4jEMRny/fWbWB0P6PSi7nrqboCYcsvSTQNdbIrDcmdNpzKN0U2J7R/grV4kMST9vKOcI X-Received: by 2002:a17:906:f0c9:: with SMTP id dk9mr7129849ejb.51.1607087838238; Fri, 04 Dec 2020 05:17:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607087838; cv=none; d=google.com; s=arc-20160816; b=YvdtXeRWWHnZg6NerDMGM7uTT3j5xdWAj2brDpURjjChLQPFC2qS4bb5w2DvBSCH8z Ag75u54/iDH+BNVcU+D37LniPpzsDE2olX4CDFBGS+ZLE4VIbaw1T8LASSbGcjgLtsy/ W6ogZRV4InibQCIqbhFyTz+kZTK2K+CvqERWJ4VUkOdacCOilLf+O/ggXGkgMp2+DSTh oHX5PzPjweiUHYibmGglE22S4vXR240LlpT2lzojRy2k23jAoqXitlOeNc8+z19m19dN VtnjgajY5BS2+h81udbLAVzpB+pviY8hbFsh/r2kLqkYjMhoYLfJoGpFpGdkUw3ZsiFl 8W3w== 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=uVdyctXUUQJ5ntkH5m/RI9F4Gm2fAdJt93bRP44fix4=; b=DODjPNWC4a29ZXJvOESbyQx/+etk3WS9M9N5Vz7vkTOOpozUKYYg2lqb+XwWx5RMLU 4NUspZZIC/OeYEue98wQzW3qc5KSBAG0D7ZncYmUUh3UdCXQG2V3vxVCuNNxc5yEQfHP PG4Iho0ezto5BCfGJ9dmiC6cZI+zN4sKYrn1MQiV10EZAhPtaHtKmry3TQllVCOkOAa4 kSL5WZyLRZ6AWIs9LaQLjCM+Is6MJH7A/Sn1Mb533GIJFMx3X2yYW9+IKMdO716pz/pc rb2xIh2nlyzxi3hPwSSZYQgEo/eQuzDtnYkJVb8uUFFwDH3hVJCpBPcljKjwSNRTcXsx 6L+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PsUNyDg5; 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 hq4si1352865ejc.14.2020.12.04.05.16.54; Fri, 04 Dec 2020 05:17:18 -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=PsUNyDg5; 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 S1730157AbgLDNOH (ORCPT + 99 others); Fri, 4 Dec 2020 08:14:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727898AbgLDNOH (ORCPT ); Fri, 4 Dec 2020 08:14:07 -0500 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0676C061A52 for ; Fri, 4 Dec 2020 05:13:20 -0800 (PST) Received: by mail-lj1-x242.google.com with SMTP id r18so6588949ljc.2 for ; Fri, 04 Dec 2020 05:13:20 -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=uVdyctXUUQJ5ntkH5m/RI9F4Gm2fAdJt93bRP44fix4=; b=PsUNyDg5aD3WMPZeyZHEqEQa341o53K1BYwHzWvsFAQkErAcHkCxTzvpMu2WUJ6ONH IfoGXjQMrvWFPg/3DfQ9zuUsQwBV5g50psZrMlqX/mgiJvmeWyG9ZM88pWu+DwTGd+G/ 0J1JLKl3a56Bdko8ZfSQb9htE4R/CylRSd84NWvUQ8nPcYxBpCsvM17yRAvGtTOqcYjl yFnQwuwSERA7yGPaAXbKrq8wg/Pc7erpl98Bqvg76KLq+ePebm+iaZYjYadlQZ2LPlaP LbcKnjiXxpXtZkHE7Ua7sblI35qOL6FY/sI6pfI2mWMEJMInXD45o83RJVP3+L/mTQFU vvuw== 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=uVdyctXUUQJ5ntkH5m/RI9F4Gm2fAdJt93bRP44fix4=; b=o0bDmo/X/rm/p5idiUK4bDBH8wJY9XvKZLe59KDioq0PbnIl34Rc5uWN3mA58Dtign g+mhgu4uInmjB6SzVk03xFaYwTYVLzMvLayO6eHJRpsdnY38AOHwfnXvh2f6NLaGs/Hp asgMJulZcuK2HWw9RAZ1puY4CkDUCleF8HSBbHueGR4n79Wwq/+GOtUQCKVT4t4cajpP /tydVj/6PFMzhXBYLeeaKAQyLWHdTQY9+KJLo+bO3NMxHh2S+X1qzgo/pOH07DHYm87p Gws2VsSVrfft1wT9ujHQ7nbORqVGmuaNm7+yDYA5o1ybon+zmyZl8zXSAOgIm0I5jIoj v7+A== X-Gm-Message-State: AOAM531Najwn/p/IlHhy7pGbXAhIHCwEEtGFcFcDllLPJTzussy4ld1U EhBgh6kwG8/nj27ll8KHL52MTXeIYx9aPjs8VB202zFtZm8Rcg== X-Received: by 2002:a2e:918a:: with SMTP id f10mr3245338ljg.156.1607087599377; Fri, 04 Dec 2020 05:13:19 -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: <20201204113030.GZ3371@techsingularity.net> From: Vincent Guittot Date: Fri, 4 Dec 2020 14:13:08 +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 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 > 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