Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp31184863rwd; Thu, 6 Jul 2023 17:29:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlHdvZmWJ39+3XZ+34QwkNdr9gmVm5s+wUNAPNcT3kiDNv38XlXQ3bp9VjQ3+TiK0Az87vEr X-Received: by 2002:a92:dc0e:0:b0:345:ffad:49e1 with SMTP id t14-20020a92dc0e000000b00345ffad49e1mr3357864iln.1.1688689797325; Thu, 06 Jul 2023 17:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688689797; cv=none; d=google.com; s=arc-20160816; b=Gnez+2ZuZB3QnQCuKbayvUWbb/rNGMnhkrkWX6RbfTWzDZF5FEh+mzXgL60EGBOTLZ 5sFbUhpihtV01bhWODF9DKBAPas+QTNXLajc7MGNw5xeKwOiv/hagrtVbOTfmFMhuaka 7kzmBOqn0u7Ads3zdnUwhCFqYbsIW6/uZywYPqhQWqsPKD1LFx2tAMGAD4oFcvzDtmmC /KwaXXyQvXZS3CtNwCvESVjU2IIwinpvHIvgGx+ZDp7jBxitoj4aQ+keMY0OVKHzmaR9 8BDx2onHlTlPBucDJU6BQ4WUarKE6JFpEzsAOgXDx2tyoN1GHR+N8oEl7sVWUvDozKqp Vhkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=JgfBtnnd8Wu+Ilm3aM5Renbz4/JdJQZUPJhQ1XSbxKQ=; fh=vwrLIi/0Esz7rfh4LPvFmLWv3aIE4ofD7tnD0DA3HDw=; b=pDZ1d1I1NrhPm65DO5rdIefd0WH0TEbGbboBcDx3rt1+Pd/19MmWuPaFHl8C1W/Xej k1VK90yY5eKtSSfoBQ1TwZNAX/RiHcfvdN390yWtqQqvVb9s7oNQulrPXVqzM8Wkqnpf cF3XcqeUdzwe3yNsQ7X6Jy+CmKQ/o0EImoBNXbg5P2mufwFLmdqupoZV1n4wDtOZNOkL 0dS3lX7oQq9ys6aQhV6M9qWyv1jShsVQ1zpkErp089/r27qpQMTJnDFFcbhlxN+SCeAc igbjCcku91bdV0q5WfEkRd9vs8joPdLtoLuAqpaMaZD9KBgRkWn1Q1WDvkRZ9qrGmeIE ufBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=c+CPDtpY; 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 t33-20020a634461000000b0055bf3d0c991si2271180pgk.5.2023.07.06.17.29.44; Thu, 06 Jul 2023 17:29:57 -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=c+CPDtpY; 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 S231594AbjGFXqK (ORCPT + 99 others); Thu, 6 Jul 2023 19:46:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbjGFXqI (ORCPT ); Thu, 6 Jul 2023 19:46:08 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B8801BE1; Thu, 6 Jul 2023 16:46:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688687168; x=1720223168; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=5z4OjmeZwDQyXYWW2PZs4DvSJouSgf57c25znqVWnvk=; b=c+CPDtpYuTK9VqKMb27hiBAFRJcav/ET714jsCBo0NTolueMg5yjmBF7 +BigaXKn3PX/PHQFBDPUM3NfDpg2xCLJji8MGdGgFOOHkSSgoL1DZn71+ UNfZ6/SoOwuC7lYByGXNTje2Dii1z8BFgKpAizGfThqpYZo5aAhZKK5fN 5KrWgJ3kXAs/sMd2a7fdhTkNclZeMb6wtb0WqFoYYqL3QtuUbtUFdYuVK I96Oj9Je9ogt2/nFuoJTukNSSS4n+VD522q1OGqcmITMr6ankyNL2BtqR rByjg3GVrk+GDDvIkxGe4GbUuXA0o275hHEgn1w4zC5B5qLJXiQ9h3GjF Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10763"; a="344086754" X-IronPort-AV: E=Sophos;i="6.01,187,1684825200"; d="scan'208";a="344086754" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2023 16:46:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10763"; a="697038151" X-IronPort-AV: E=Sophos;i="6.01,187,1684825200"; d="scan'208";a="697038151" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by orsmga006.jf.intel.com with ESMTP; 06 Jul 2023 16:46:06 -0700 Date: Thu, 6 Jul 2023 16:48:50 -0700 From: Ricardo Neri To: Tim Chen Cc: Ionela Voinescu , "Peter Zijlstra (Intel)" , 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 , Lukasz Luba , Zhao Liu , "Yuan, Perry" , x86@kernel.org, "Joel Fernandes (Google)" , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, "Tim C . Chen" , Zhao Liu Subject: Re: [PATCH v4 07/24] sched/fair: Compute IPC class scores for load balancing Message-ID: <20230706234850.GD12259@ranerica-svr.sc.intel.com> References: <20230613042422.5344-1-ricardo.neri-calderon@linux.intel.com> <20230613042422.5344-8-ricardo.neri-calderon@linux.intel.com> <20230625201155.GA3902@ranerica-svr.sc.intel.com> <7ca035b73ebcce9fde270227a5b630b169ebdeaf.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7ca035b73ebcce9fde270227a5b630b169ebdeaf.camel@linux.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) 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 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 On Mon, Jun 26, 2023 at 02:01:25PM -0700, Tim Chen wrote: > On Sun, 2023-06-25 at 13:11 -0700, Ricardo Neri wrote: > > > > > > + > > > > + score_on_dst_cpu = arch_get_ipcc_score(sgs->min_ipcc, env->dst_cpu); > > > > + > > > > + /* > > > > + * Do not use IPC scores. sgs::ipcc_score_{after, before} will be zero > > > > + * and not used. > > > > + */ > > The comment is not matching the check below. If zero > is not used, the check should also reflect the case. Agreed. This comment is not clear. I meant to say that returning here has the effect of leaving the `before` and `after` scores of this group as zero. Since zero is the minimum possible score, this group will not be selected during the tie breaker, unless the statistics of all other groups are also zero. > > > > > + if (IS_ERR_VALUE(score_on_dst_cpu)) > > > > + return; > > > > + > > > > + before = sgs->sum_score; > > > > + after = before - sgs->min_score; > > > > > > Tim