From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D089C433C1 for ; Tue, 23 Mar 2021 02:09:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 207F7619A9 for ; Tue, 23 Mar 2021 02:09:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229890AbhCWCIz (ORCPT ); Mon, 22 Mar 2021 22:08:55 -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--