Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1121828pxu; Sat, 12 Dec 2020 02:49:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwhH5XkbaUfC5Hs2D9NGx+a8j6eGIpWxdwkMKNHNvsCSgriYYr8q6RrRsuGKFgCz4OV+521 X-Received: by 2002:a17:906:b7d6:: with SMTP id fy22mr14714103ejb.219.1607770191585; Sat, 12 Dec 2020 02:49:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607770191; cv=none; d=google.com; s=arc-20160816; b=pKH+oyvOa0I8Bt3QY8MVP4ivEyzNyD5RYVlchhs3VtfFsgDVMzynWVUZJPyyHCZooR gP0KA/pzltil39Tu9epGB/8Qz/k7pVILoCsNMmA7QPEDAEy2Zeuu+zPicUDmleg1eJZ8 RLoYRzTMbuKh9EDPQQ7F/vREo1KmduA69v3lafq3ZhXafz7y7SzwCIpO8DC3g3rMa0Yv tPur1a6gDcxNwHHEuK77EowflEGeqX1IxMBsx+uWkYD9WqHzoqq6sgF+I5gNctbnWl7+ /IjwYsnr3p7v2thFCxlhpPcQmKnYMwpxUSW8DSl4IqHLxHP9SDkFTrj7z9JRseUEgr3a dn5A== 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=EqG/RiyorwCXnP6CASf5E2OkGRGE96QcN3juhk/aOEY=; b=LQA6afqPeT3knSkuh9lFjge2lURHOu3kMYsTL7J/RgVqrmRTm0ihLBxog3uB3+lj9Q xOpziA+pPfHg++3u+fFkVBREdy7duzXC4JxElHqdOt1jUVjGzkHcKSdVe1tXWJaFU76o 6vt/hh3l1rYQuxAuyrmknNSEbakyeNR6mqrvR/SijRN2X68qKs+Ob9iKtUcsTJrg6MQe Jx6EY+Ru0dPSUs2bol1vgFKnRXKOiQfGJSDAzIlAtzpnp3Rqq++DMEuw2wRTM12suSci XBa8lczbLK2y1F3YLUsuFGaU7ooFVdeIOdP1J23NR3ZP/LwywO80kevVH8zyEPZoFJjY hnxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=r3Cwqg9S; dkim=neutral (no key) header.i=@linutronix.de header.b=JFV3XEWs; 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 s15si6056746ejb.157.2020.12.12.02.49.29; Sat, 12 Dec 2020 02:49:51 -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=r3Cwqg9S; dkim=neutral (no key) header.i=@linutronix.de header.b=JFV3XEWs; 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 S2405665AbgLKJfd (ORCPT + 99 others); Fri, 11 Dec 2020 04:35:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405657AbgLKJfU (ORCPT ); Fri, 11 Dec 2020 04:35:20 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 568E1C0613D3; Fri, 11 Dec 2020 01:34:40 -0800 (PST) Date: Fri, 11 Dec 2020 09:34:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1607679278; 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=EqG/RiyorwCXnP6CASf5E2OkGRGE96QcN3juhk/aOEY=; b=r3Cwqg9SjWu8Yy7QgQZILCNntTV1oyqjLBieO2tAapSj3MpQs8GbTf9wiRo1gp40lJq+DS TiVbihG94NBYowU8iid8ZwG/tSj5Ulpc+IZCd9emuu/aprjFx0HPmM17XQ3VPYhUNgWCCJ 6vhgsF1FBODJ8Gqxgw+E7O6+Cyllsle0hwXfeMkKz19Ztav978vMoJdwGb3uuBC+9Fmc83 0ymRSzR/A1xC9X/OCq29tImDZcDHF48DsGAN8LRdgD72nrDJUAxapikZzy+Dl907+daVvT p2L7jA+uLlIq01AycFbHVPHquitKy0d5/IuL0XVqFoMF4cpjcPHs2oGXxu7zZA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1607679278; 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=EqG/RiyorwCXnP6CASf5E2OkGRGE96QcN3juhk/aOEY=; b=JFV3XEWs3E1PQ+fRJSzu0h/M1hhAx8tocfLiyXGExrgeh6nS4y7kjcZq2D7KyNGQmIE1ZH wvAkYOoWQZ1SHCDA== 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)" , Ingo Molnar , 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: <160767927797.3364.8571066133105790079.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: 13d5a5e9f9b8515da3c04305ae1bb03ab91be7a7 Gitweb: https://git.kernel.org/tip/13d5a5e9f9b8515da3c04305ae1bb03ab91be7a7 Author: Mel Gorman AuthorDate: Mon, 30 Nov 2020 14:40:20 Committer: Ingo Molnar CommitterDate: Fri, 11 Dec 2020 10:30:38 +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) Signed-off-by: Ingo Molnar 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)); } /*