Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3895279pxf; Mon, 22 Mar 2021 19:12:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxS9jSYfsmz/69h2sxfl2RJU63TN2nSa1CdEs72843mmj5N50q/95Vi3lMuegWwznuBfo48 X-Received: by 2002:a05:6402:4309:: with SMTP id m9mr2443729edc.25.1616465541661; Mon, 22 Mar 2021 19:12:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616465541; cv=none; d=google.com; s=arc-20160816; b=haVt85JBxwxJ7Lfg4uszHtPx1czc/CPD2KOMxuCOHOizYKKYxyApIsW02Kjv/c5yii JB3Fy1Qdrv0zWlbl0x0Zx2QsGK3aPD4Mp/KiU4OqajoNxHBtVshGqV0BfanadxPEL9pk iVjeC4I59Fj4oUDBC4gg2GnkCXz+8Jgyg1cNxapYIPPFcaukyK4Rwwi5iUnCBWnYJHBb Ni+brzmtMd8zsnBILtfBnffquxbygwZjrXySfCKetlFmVfLmg2ckAc2B0AsckD4vpUtb zu+18Wln0x1kFKptLcVOGHqXTwXM+vT1QIB3SFQvqFk7vVX1GF/6A9/wZ5Xv0GwP7uy2 XQaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=U647/7M1tjbAF4dVsaq+e91RQ0Pi6MsmeuKKLXHtGHk=; b=ZKJZIyX6JTzx3jo1N2ANcYsEAuh+gAfvNSPE+eea52F5TN1qA3DaSFKmtgokQcYf2D m+jEtln8sBzf9ht/2Xcdnms737g7S4F5RAILooLYiwy4jtuQs2Dc+dyElLsiau+ker5m fGTzs6f3NUBUgYOiWfFbV4aefjbHwwLMAMNxoFKZKkbfoBN9GvYmgyYNGK2N7w86jD5N xqD8MM7Akj9Yv884Ryt3bMd4WtgKbGCWQcSYNgMf2tUzBNXFAIhtgZF9VEddQdy1dxg+ kt4mIFlGt8jb8kt/Q8Ys4LBTLgms9EnN7Udqsa3M7lDc2XUSXlZZ0ge1ghcJdvLPpjaz jsKg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si12883737ejd.658.2021.03.22.19.11.57; Mon, 22 Mar 2021 19:12:21 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229771AbhCWCIy (ORCPT + 99 others); Mon, 22 Mar 2021 22:08:54 -0400 Received: from shelob.surriel.com ([96.67.55.147]:45556 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbhCWCIU (ORCPT ); Mon, 22 Mar 2021 22:08:20 -0400 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lOWSl-0000Ym-R8; Mon, 22 Mar 2021 22:08:07 -0400 Message-ID: Subject: Re: [PATCH v2] sched/fair: bring back select_idle_smt, but differently From: Rik van Riel To: Mel Gorman Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, "Peter Zijlstra (Intel)" , Ingo Molnar , Vincent Guittot , Valentin Schneider Date: Mon, 22 Mar 2021 22:08:07 -0400 In-Reply-To: <20210322153320.GG3697@techsingularity.net> References: <20210321150358.71ef52b1@imladris.surriel.com> <20210322110306.GE3697@techsingularity.net> <982f027e3a91b74cfa93e6fa91e2883d6c2f5dfd.camel@surriel.com> <20210322153320.GG3697@techsingularity.net> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-xyUnV8fuVxsgGLSghDhF" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Sender: riel@shelob.surriel.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-xyUnV8fuVxsgGLSghDhF Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2021-03-22 at 15:33 +0000, Mel Gorman wrote: > If trying that, I would put that in a separate patch. At one point > I did play with clearing prev, target and recent but hit problems. > Initialising the mask and clearing them in select_idle_sibling() hurt > the fast path and doing it later was not much better. IIRC, the > problem > I hit was that the cost of clearing multiple CPUs before the search > was > not offset by gains from a more efficient search. I'm definitely avoiding the more expensive operations, and am only using __cpumask_clear_cpu now :) > If I had to guess, simply initialising cpumask after calling > select_idle_smt() will be faster for your particular case because you > have a reasonable expectation that prev's SMT sibling is idle when > there > are no idle cores. Checking if prev's sibling is free when there are > no > idle cores is fairly cheap in comparison to a cpumask initialisation > and > partial clearing. >=20 > If you have the testing capacity and time, test both. Kicking off more tests soon. I'll get back with a v3 patch on Wednesday. --=20 All Rights Reversed. --=-xyUnV8fuVxsgGLSghDhF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAmBZTYcACgkQznnekoTE 3oPAYgf/ba0Cr42MT2tVn5FYSjaj8HD4oiYVei3lxUFEG03l5UtmLbuAyvCusD/6 74gkW7wHHWTKQvled5FAi/rNHz9RR1vxciPaXfxchUeCrm6dK6Pf2iRTAkCFQQP1 noNjA9JCkj6JX7V+dEBa2Suyh5su1IN4NkQh6ZeqIJdxR7zol336pf2P8QBFQ4Sb J7GAWVHEhndG8oXlGAqpCcy+32a1Jvd/5r2KbESO/ka9a3Py0CGMY5NPXTaTdZsx EVZSvp/qLBoIUgVwIzOJZNBqirDpJzv0oOLQBGjs0ZGgP3EqEITjA9kPefNjCvXD nt9uFXEvWXW3pgk8Yid3zYzkmrC1Ug== =FUHx -----END PGP SIGNATURE----- --=-xyUnV8fuVxsgGLSghDhF--