Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp337301pxu; Thu, 3 Dec 2020 01:15:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3UjVdnLiRgQEgi6i0CZLTd08XO+BK8rmk6hqQ8VxhzO98Z2vUVqm+Z8Qg8L42G0KxJL6z X-Received: by 2002:a50:b205:: with SMTP id o5mr1980975edd.304.1606986950966; Thu, 03 Dec 2020 01:15:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606986950; cv=none; d=google.com; s=arc-20160816; b=T0wXHLqVxY0bJDiodprH8Bv26lT+YO04IV8ow9ezi7SeDB14Xu2kyblHgR0jyFgKgg IfvbTOmhBe9Nz3sorBgKOIR6gxlOmA7qne9H6g90C0Mt3FvRxMpH09BXPcmmJP2YBX/r 5THJsXRuUbY13ylRO0nwGjsznTzTI5DqvTmXy2YRB7b/C9Os0nicMvmh6JvmYFbflFWQ AuNKiDYTggXHNgqO0yqHeKZtGgzVi8ufJzth/qFi3mhDvuwpZxsW/RifVDXzi2ldBVbn +bDM37y4oDcFHimWfRk1HPzoVignfyQCVzRQlpx6Kqx1huI5V7spN2siUg/h2NwHN3q3 iP9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=132nFXVQJMUd8IdpyU75XD6LEF8LrlNQoNesc2KuiMw=; b=k/dKmp4PWY5j1yW5TXgv02BYTjx8pGBFKnVQDEw5QN79fWJgBVRZR/4G0GCU43e+/m KM5M2qZVEONDdB/ljw9KzetmTXoujHtuJnWsSuaUzlccyppY2ss/Zob+/nPsr9yHK4rf Vck3LE8zoVAGyz61qou7koNjrm1moljX6s5QopmtwFmk/55HrJHcD4gcLQBWUNX/T6dE LrxwToX6l83+mUJ1Zjb1y3qVJ5hIyv7ayKtPwboqQEZSc4B+csfaMyt19uNWd3hfCrSf +dfk5l2bk5k9SmHcsxY7WXb+OmuaOHiyqM770mMdRmrF1dBXefcRNDKmxvteeShmshS/ 2QaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=syEOw0oL; dkim=neutral (no key) header.i=@linutronix.de header.b=vWqgXKDQ; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w5si571596edi.111.2020.12.03.01.15.27; Thu, 03 Dec 2020 01:15:50 -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=@linutronix.de header.s=2020 header.b=syEOw0oL; dkim=neutral (no key) header.i=@linutronix.de header.b=vWqgXKDQ; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730103AbgLCJOE (ORCPT + 99 others); Thu, 3 Dec 2020 04:14:04 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:39472 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728034AbgLCJOC (ORCPT ); Thu, 3 Dec 2020 04:14:02 -0500 Date: Thu, 03 Dec 2020 09:13:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1606986800; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=132nFXVQJMUd8IdpyU75XD6LEF8LrlNQoNesc2KuiMw=; b=syEOw0oL181o0izYOaOdkdQA6xlI0aX2+bs7uKK3w1kLQk6Gxg3B3FR/N5uoaxVowcewtx zZAME4cHcQ46TxgvMtTrMRph4L8jKbXXSSd7B34GFieExufCIgOwsAlm6q7ae4MKxLCEtP cCH/Xe+cPgKobLOp7K0QJYeyB1O2TRFN3gcyqRz5r6l7d19LVbGXkIvrAVpacvXolKDeWJ olhN8KmpdHY12u3gZBYjBgX9lmU1VKGxN2VUw8U68XO9zCoWOPKFOXAYbwqaaS+AnTGLbb LR2iHgITGtqAH83jhYY84cq6ALpjM3t/1dbTbkm+TArpi+1jcLrLxvbx6s8iVg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1606986800; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=132nFXVQJMUd8IdpyU75XD6LEF8LrlNQoNesc2KuiMw=; b=vWqgXKDQyd/qWcvX+PptreUXItEer2AtVvNTaziG6Cm9zmqKoZoYBGH2SjQmeyabNJh0Rh P2TMQCLKVOizoqBQ== From: "tip-bot2 for Mel Gorman" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/fair: Clear SMT siblings after determining the core is not idle Cc: Mel Gorman , "Peter Zijlstra (Intel)" , Vincent Guittot , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20201130144020.GS3371@techsingularity.net> References: <20201130144020.GS3371@techsingularity.net> MIME-Version: 1.0 Message-ID: <160698680023.3364.529165199604253383.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/core branch of tip: Commit-ID: 82b738de57d571cd366d89e75b5fd60f3060852b Gitweb: https://git.kernel.org/tip/82b738de57d571cd366d89e75b5fd60f3060852b Author: Mel Gorman AuthorDate: Mon, 30 Nov 2020 14:40:20 Committer: Peter Zijlstra CommitterDate: Thu, 03 Dec 2020 10:00:36 +01:00 sched/fair: Clear SMT siblings after determining the core is not idle The clearing of SMT siblings from the SIS mask before checking for an idle core is a small but unnecessary cost. Defer the clearing of the siblings until the scan moves to the next potential target. The cost of this was not measured as it is borderline noise but it should be self-evident. Signed-off-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/20201130144020.GS3371@techsingularity.net --- kernel/sched/fair.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index f5dceda..efac224 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6086,10 +6086,11 @@ static int select_idle_core(struct task_struct *p, struct sched_domain *sd, int break; } } - cpumask_andnot(cpus, cpus, cpu_smt_mask(core)); if (idle) return core; + + cpumask_andnot(cpus, cpus, cpu_smt_mask(core)); } /*