Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp3057878rwp; Fri, 14 Jul 2023 16:40:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlFLxTsIP1LAIf1e9Kyh2lvjs3nS+S+p2z60exb1WCuoN+tfAkfuSYgKpPKJNNBt5HC6WRUt X-Received: by 2002:a05:6a00:1988:b0:682:edbe:4cbd with SMTP id d8-20020a056a00198800b00682edbe4cbdmr4112616pfl.15.1689378001578; Fri, 14 Jul 2023 16:40:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689378001; cv=none; d=google.com; s=arc-20160816; b=0GfZ8Ndf9FJnb3zYpw5eYGYZ+EdNhC8PelE8dABP258aXz+HoUlqFFVTvQIJfbLYs0 Eh7m4w64+BCZRWToqjVQtKp5ShSophOELWETIuroq10K9yxWYdK2pmlr4wWYIC735TJ7 O6Iqs7C3L18rQMOVF9QamCmGTLPoBZVXdNXaTDAr1k32ywZsLAjfoEurtlMDDL2hKGfa xPYCvE0Ttt1aD/E7rCglegtWxx9WXc4BocN3e14kDSybh4IkFT2P1dfPO1TX9ylarseA LwXcpYE1+lwpSzCa3O8RT1bV1WbUAHVMmgEAc+W7mSBeDsjS7r6da4OesFr1GcbKp3DE JBrA== 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=jWKUhy3Fehd/kXzAq1ceZtxPSh2T2VCetHIRcrKE9hI=; fh=LW5NgDSF1Zod7TklUpQLiaXcoOpo1UDla+ETXfdrY5c=; b=bv+WPQL6MdBXpbirwysQNQSD9g04JslodyybVyju/V8V4oS0dE0BH5T/PztVpB4f/a BuKKeOOd+d+Vl6fZ41B1Nu0DcY6ltm70uy6cMoVKfnN8bPyaa8SHbXkD3CZtxM17uM8Z I7qC14ExH58BDcLBjKcJ6RPpGy+8OliUEqiawm5ZAc1gI3uU6qOpNLjywpEdGrMCxvRL 9gcOvMXiPz1mX94ZeLhe88ClnUSX1r4b5En0YeVBDHaRsTdVJle5cWAsM+toYl+DVtvE nGfS3sKLUxOdVT5XKOAM8fP72pq5vLpFhJUr7aPQHmcoTfYEdba7lbL7Hd8QuWnCO2rS HoyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lkBV0mrm; 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 ay5-20020a056a00300500b0068270404171si7624566pfb.208.2023.07.14.16.39.49; Fri, 14 Jul 2023 16:40:01 -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=lkBV0mrm; 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 S230027AbjGNXXI (ORCPT + 99 others); Fri, 14 Jul 2023 19:23:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229513AbjGNXXH (ORCPT ); Fri, 14 Jul 2023 19:23:07 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AC7B198A for ; Fri, 14 Jul 2023 16:23:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689376986; x=1720912986; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=UFNjXLKITbspSo/eDpkcEH18zDiE7dmQzWrzA+9BOXk=; b=lkBV0mrmri4X1qLdl3vJ7Ato2IeceF3qs0dNNU5vsR8yE+5a2uLwjiuF gbuan7YQM/vzSL3Kvfg1AUOX4BM0B8eWFnllsbajRVQoHiqH15sQe/wwc zeISkkyPg3up97eHClB+kCqbAeI/BI9MeNIhxpe9AUzQnMXF9VvcJUV1T LuFpxrshsCfHvvQGo1yJjD9OTuHKL8GfWKIANbFeiW3b2990jVordJZT/ BBfFBEHENctbuQcV1yz0rxmODQNIpU6zDkqVH0rTnPo07U8HJm54uFzrI 5Viw7W/DON9pmaUf+eqXsbTre4p56Hc618daqaJuBvlfnklv+aCFTGmYl Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10771"; a="350470827" X-IronPort-AV: E=Sophos;i="6.01,206,1684825200"; d="scan'208";a="350470827" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2023 16:23:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10771"; a="1053239783" X-IronPort-AV: E=Sophos;i="6.01,206,1684825200"; d="scan'208";a="1053239783" Received: from bmuller-mobl.amr.corp.intel.com (HELO [10.209.37.94]) ([10.209.37.94]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2023 16:23:04 -0700 Message-ID: <8333da418828569495f3b92919e6980a5dac0295.camel@linux.intel.com> Subject: Re: [Patch v3 3/6] sched/fair: Implement prefer sibling imbalance calculation between asymmetric groups From: Tim Chen To: Shrikanth Hegde , Peter Zijlstra 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 , Tobias Huschle Date: Fri, 14 Jul 2023 16:23:04 -0700 In-Reply-To: References: <4eacbaa236e680687dae2958378a6173654113df.1688770494.git.tim.c.chen@linux.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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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 On Fri, 2023-07-14 at 13:44 -0700, Tim Chen wrote: > > >=20 > > > +static inline long sibling_imbalance(struct lb_env *env, > > > + struct sd_lb_stats *sds, > > > + struct sg_lb_stats *busiest, > > > + struct sg_lb_stats *local) > > > +{ > > > + int ncores_busiest, ncores_local; > > > + long imbalance; > >=20 > > can imbalance be unsigned int or unsigned long? as sum_nr_running is un= signed int. >=20 > It could be made unsigned long.=20 >=20 >=20 Though in theory the imbalance can be both positive or negative. We are considering only positive imbalance here as we only pull task to local grou= p and do not push task from local group. Tim