Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53DE2C61DA4 for ; Fri, 10 Feb 2023 00:37:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229987AbjBJAhj (ORCPT ); Thu, 9 Feb 2023 19:37:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231221AbjBJAhM (ORCPT ); Thu, 9 Feb 2023 19:37:12 -0500 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2E377095E for ; Thu, 9 Feb 2023 16:36:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675989401; x=1707525401; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=GBLao6NE/SGSwkVRdGz+EqF+VC4oUdgalsbEcOSG9sM=; b=RujB3omMHyN6h00KRwsuBoQwZ/FNlqadQW5gV91AO5ammcn+eHFzxUvR eq+IQtnImvDiliIieT/lVIT7BsmkXpjXLam1PovGPdGgrnUzSpQiAcUmX aQ7XrannDl2ocFATXpvXPWOjCaJkvnoasG4t8F5LoL1ccER18mk6M9RB4 LCwCt4mSLgOlAdhhgp37QyNVS0DRWYYrh8Z2jEaskqqQBWuutQSkKNcUV UGpXA/MKEgdLicaCykdfBBqQkLcdNaH+AQSG0pwwK6NTDbgwMYx6iAsmX hSxqM3xi2oKTmlH502Mu0eDvAPjQMpsHV/7fz0hiw9OG5kNooqx78RLd2 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10616"; a="310656321" X-IronPort-AV: E=Sophos;i="5.97,285,1669104000"; d="scan'208";a="310656321" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2023 16:33:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10616"; a="736556385" X-IronPort-AV: E=Sophos;i="5.97,285,1669104000"; d="scan'208";a="736556385" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by fmsmga004.fm.intel.com with ESMTP; 09 Feb 2023 16:33:49 -0800 Date: Thu, 9 Feb 2023 16:43:33 -0800 From: Ricardo Neri To: Peter Zijlstra Cc: Vincent Guittot , Juri Lelli , Ricardo Neri , "Ravi V. Shankar" , Ben Segall , Daniel Bristot de Oliveira , Dietmar Eggemann , Len Brown , Mel Gorman , "Rafael J. Wysocki" , Srinivas Pandruvada , Steven Rostedt , Tim Chen , Valentin Schneider , Ionela Voinescu , x86@kernel.org, linux-kernel@vger.kernel.org, "Tim C . Chen" Subject: Re: [PATCH v3 04/10] sched/fair: Let low-priority cores help high-priority busy SMT cores Message-ID: <20230210004333.GA6166@ranerica-svr.sc.intel.com> References: <20230207045838.11243-1-ricardo.neri-calderon@linux.intel.com> <20230207045838.11243-5-ricardo.neri-calderon@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 09, 2023 at 12:53:41PM +0100, Peter Zijlstra wrote: > On Wed, Feb 08, 2023 at 08:56:32AM +0100, Vincent Guittot wrote: > > > > + if (env->sd->flags & SD_SHARE_CPUCAPACITY || > > > + (!(env->sd->flags & SD_SHARE_CPUCAPACITY) && is_core_idle(i))) > > > > This 2nd if could be merged with the upper one > > Wasn't this exact same condition used in the previous patch as well? > Does it wants to be a helper perhaps? Patch 3 focuses on the destination CPU: make sure that it and its SMT siblings are idle before attempting to do asym_packing balance. This patch focuses on the busiest group: if the busiest group is an SMT core with more than one busy sibling, help it even if it has higher priority.