Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp3907592rwp; Sat, 15 Jul 2023 11:54:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlECO6wxdDyTemUiRh4Mxmibu1wUnRcoGrOnHYC9Tvdsm8UTuMkqaX4BaG1Z3eumXTTUi6qy X-Received: by 2002:a17:903:41c7:b0:1b8:17e8:547e with SMTP id u7-20020a17090341c700b001b817e8547emr3253257ple.1.1689447278767; Sat, 15 Jul 2023 11:54:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689447278; cv=none; d=google.com; s=arc-20160816; b=CMUdKeXeRqoaNBf3gu8RCdBizcWWu4OimS1bbGTyymj4Fax4tpFnVMs4Yps9hS0oIa MATsFbiEzEOWQCGsDCvMAVQ8CRoFvbXnpc2zF8X19biYgx7r2rA92hRUUEOnjbl6wqf6 JEKhzrdCYEErv+jxBOgKEM4ovCGEEM+au7HRLAeW5lNZb/GUT6pg+UjZZJA7tLJzGmbv WY2BOqrajP1/HKfkx+BKf82qfqOX5YwOUraCyGRAOrIGPFw7/UtfYafbBxTrYTxmXEQ8 dY4svrBKRmQJwCZ//fKWc2mwCfgrxE7jPEghyml7/7S5sOOnIcmXsNUMgv7YI+jm6NEF FRZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=kur2c5wRYqzJ0tpLJIceeWxVstmlGkwDFaeUn3qMvvQ=; fh=X49MPHDwqFI8s1Z7v0l4MTilxnHRYEafvRiZAKT9zG4=; b=nXFT4c7J/on7ZGCdmCv7obVQT6gMIdrjOxzUPcxvArb7fM38kftn6HWyuMH6NrInV3 4y8zfm92xinsdUlndV8ESj7QEWWpdbC+5GRdVIjjKAJ7kFLsyKhbliEFyDnjMeyNf5tJ PBDJL2JoA4YYng2GC1HaJDdLQivu7mWaQGSfzsclU9rRroc+nKbnMpSo71uyj73h6AQa xdLqlYALT8DN0dp2ENxDxSOkMkd1EvBlegvffACrpDjdKGYGBtmxedyyvSukMm4K8YVn f5soA+2C+G9USEgfqjswXIdwRAc/vkseZsr2vGUbstjeF2gMe/llLr2s9qX0H6MXmCuG vIHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="CYrmDcb/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h13-20020a170902680d00b001b02e044c87si9031017plk.320.2023.07.15.11.54.17; Sat, 15 Jul 2023 11:54:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="CYrmDcb/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230170AbjGOS0H (ORCPT + 99 others); Sat, 15 Jul 2023 14:26:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229632AbjGOS0F (ORCPT ); Sat, 15 Jul 2023 14:26:05 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8B4630E2 for ; Sat, 15 Jul 2023 11:26:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689445560; x=1720981560; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=TiANDhvFKHNYarBo0f5b7OHT2MfFmM6d6+cbcqZYhXU=; b=CYrmDcb/Wi6HHq3kYBYVieYOZobSCBUF+YV8OplWNxsCI408Wy56qXWW ib3yameH8kQjMmeAewFtXyeQcSrpBXGAM78uVcvCxGnpfQ6I0TCAHaE77 3EzOmRnCLAXDWKU3U+p8h6fPF7I+TU3aYI2FuOdAPT20q/3qOgvdnqJQs sH5xvaG+lQR1FHihZFjRQ1eBNPgDL/0sdCCAAgmp4cpLhPjVZAGKha9KZ qOL67kkw1aaWFbWdVekidElr77hN2QqyOKm/Mu3yFE3kdLzHFD9jySST0 24uqo6aV6Ptl9iLTSrY7bJKIVUV/IIyDZcyE8QbmUw3EZ2u2gd1+sIi39 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10772"; a="363148382" X-IronPort-AV: E=Sophos;i="6.01,208,1684825200"; d="scan'208";a="363148382" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2023 11:26:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10772"; a="812791063" X-IronPort-AV: E=Sophos;i="6.01,208,1684825200"; d="scan'208";a="812791063" Received: from nsbhole-mobl1.amr.corp.intel.com (HELO [10.251.11.90]) ([10.251.11.90]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2023 11:25:59 -0700 Message-ID: Subject: Re: [Patch v3 1/6] sched/fair: Determine active load balance for SMT sched groups From: Tim Chen To: Shrikanth Hegde Cc: Juri Lelli , Vincent Guittot , Ricardo Neri , "Ravi V . Shankar" , Ben Segall , Daniel Bristot de Oliveira , Dietmar Eggemann , Len Brown , Mel Gorman , "Rafael J . Wysocki" , Srinivas Pandruvada , Steven Rostedt , Valentin Schneider , Ionela Voinescu , x86@kernel.org, linux-kernel@vger.kernel.org, Srikar Dronamraju , naveen.n.rao@linux.vnet.ibm.com, Yicong Yang , Barry Song , Chen Yu , Hillf Danton , Peter Zijlstra Date: Sat, 15 Jul 2023 11:25:58 -0700 In-Reply-To: References: <165778ce-7b8f-1966-af02-90ef481455b9@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >=20 > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 294a662c9410..3fc8d3a3bd22 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -9588,6 +9588,17 @@ static bool update_sd_pick_busiest(struct lb_env *= env, > break; > =20 > case group_smt_balance: > + /* no idle cpus on both groups handled by group_fully_bus= y below */ > + if (sgs->idle_cpus !=3D 0 || busiest->idle_cpus !=3D 0) { > + if (sgs->idle_cpus > busiest->idle_cpus) > + return false; > + if (sgs->idle_cpus < busiest->idle_cpus) > + return true; > + if (sgs->sum_nr_running <=3D busiest_sum_nr_runni= ng) typo: should be busiest->sum->nr_running > + return false; > + else > + return true; > + } >=20 Tim