Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16639740rwd; Mon, 26 Jun 2023 12:56:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5G9pxB9j2Ku+XP9q91ontODPFjGfMbGfVYAEn6bvDm13B7agh2QQY9D2Tto8H0ozQHUI4t X-Received: by 2002:a17:906:c049:b0:98d:3491:68da with SMTP id bm9-20020a170906c04900b0098d349168damr8997905ejb.44.1687809364738; Mon, 26 Jun 2023 12:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687809364; cv=none; d=google.com; s=arc-20160816; b=ZRwgEi8vIdIliL+ueKehlZ/foo/Azy2SmuqVEGmwEzjhMKI6Pi3ZTiNbaKXifNzLqJ DF8ymBMj9dKDA6HxVchJl0UgZyqQKayv4guvUYO66VGdOVjereQHHpy+wLWPK0qPQKh0 cOEekrvy9uB21Eoky79qFAJ/rf+Tv4H02G1jIz2/Ik4d3mjXAuZ2sBGQMVRfsuZNp6nn 1JYx0qqn8q6OACj7X5j2TqvXXITVOa2dwIkeLTl7oNp1yt6REC7c1fRmgCABHqroMjD4 YlzJUj0W/c258Z1yhH4xpxfXwB+S+E8sSMGx6Sc1oYggO2kN7Jh5NewgWyEkZqja7M5e oM4A== 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=CMjkRkOv6f8Kvvoq7FOZ4ohXkLkJ2zGo8DnrdRiOAs0=; fh=1k3MxybK+cxlVjkHVH93CwxRag69GADL8eD+ft3ACQU=; b=yVUuFQwx0oQ//FI+reuwbhE1Pp2iNml7yYv7RyKoaJAkApAgnn7lsXcqf6KSMdmAnS 6PiwrI+bwXNNHUqcL1pO2/zeV67mCD+6VFwiQpv1ISC9wM9Y/nLT1CExzS9CByaiwd9P jzDjxr+WbPwmgVUgN0BZi4FrxSRvMADjEyeN9nAghKn9GwIK2xXqbHlAnhrscMUqrYkY si/HUtRczD3XUfPILwQNUyFtqyQwjsbY1fQ+Iz7Z/5joQtFR5+FHVQ5xKvKwlS/4HmdA vJ774rsp0XgTopcej1lKwJQ+GeTyC/MbaVekqvwC+CtGAksMSLtrOlvi7/yuYArpMsqH trEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YS61IW9S; 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 gf18-20020a170906e21200b0098282dca7dcsi3449266ejb.519.2023.06.26.12.55.39; Mon, 26 Jun 2023 12:56:04 -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=YS61IW9S; 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 S229533AbjFZTxE (ORCPT + 99 others); Mon, 26 Jun 2023 15:53:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbjFZTxC (ORCPT ); Mon, 26 Jun 2023 15:53:02 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01F3AE7E; Mon, 26 Jun 2023 12:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687809182; x=1719345182; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=6SK8NB2LsBYbp7+J0GVDHHXUhFuGKobVNw10WdKFO2s=; b=YS61IW9SxFTXZYlrRSv7ZP452Gzb0cBZysYOYOEi9XnYglOlMdVI4oUy ZDhPLtnx/uTrstRjAIh8i9A+xqQ7DO8wOffFDFXBBAIJTmU+5w1Z1bo6y 77zCoptY3h4GFqqGYGeS69ReYJQfMwXcFA9xEiyHmJ3o2vgS/cSPLhwGj FDzT+GD+RS+UWpM0CPEdHvEEEIsloeJwnse+v6NrboFZohxIiqN7R2hoZ S4YEUqAcN5OYuiHHIq2o46fo8hN+3yPetdTlJdizzuaFXxdSuYCVZP8ql oR5/2s8lkzbIIjAr8NcGqrv3gpkg7NNRW6iBV8UseBoaRLwRfonkixVWO A==; X-IronPort-AV: E=McAfee;i="6600,9927,10753"; a="340959275" X-IronPort-AV: E=Sophos;i="6.01,160,1684825200"; d="scan'208";a="340959275" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2023 12:53:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10753"; a="781576168" X-IronPort-AV: E=Sophos;i="6.01,160,1684825200"; d="scan'208";a="781576168" Received: from jingyan2-mobl.amr.corp.intel.com (HELO [10.209.115.106]) ([10.209.115.106]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2023 12:53:00 -0700 Message-ID: Subject: Re: [PATCH v4 06/24] sched/fair: Collect load-balancing stats for IPC classes From: Tim Chen To: Ricardo Neri , Ionela Voinescu Cc: "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 Date: Mon, 26 Jun 2023 12:52:59 -0700 In-Reply-To: <20230624000121.GA32639@ranerica-svr.sc.intel.com> References: <20230613042422.5344-1-ricardo.neri-calderon@linux.intel.com> <20230613042422.5344-7-ricardo.neri-calderon@linux.intel.com> <20230624000121.GA32639@ranerica-svr.sc.intel.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_PASS, 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 > >=20 > > nit: the comment is unnecessary, and a bit misleading, IMO. > >=20 > > The comment says "This group will not be selected." but the only way to > > guarantee that here is to reset the sum_score to 0 when you find an > > invalid score, which I don't believe is your intention. >=20 > You raise an interesting point. We will call this function for each rq > in the sched group. Thus, if we encounter an error, the scores would be > incomplete. Therefore, I think that the scores should be discarded and > reset to 0 so that they are not used, IMO. Since we still have other rqs to loop through, reset to 0 here does not guarantee that it will stay that way at the end of the loop when the sum could still be added to. May need a special value like -EINVAL and make the score a "long" to mark such case. Tim