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 147C3C05027 for ; Fri, 10 Feb 2023 12:56:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231961AbjBJM4P (ORCPT ); Fri, 10 Feb 2023 07:56:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231727AbjBJM4N (ORCPT ); Fri, 10 Feb 2023 07:56:13 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C3946BD17 for ; Fri, 10 Feb 2023 04:56:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676033772; x=1707569772; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Y8zxgGCwhMDmV7vaqtoKzlagEvVdPgNTwWyjOM6v9qo=; b=UyoQIRsWYM/b2Rxjuw33GNcKJPzsz4X4npvmRVgvAGMHDjAq1VXNbYJe 5YM8ytKZh5Puma/UY/fohfn1+Zpd/2rNjiSke5FvnzfaUo13quPE3c8hj Nac51WlTXhIVQV/AhxeiEVooorVyeQn2UPkoW3y93um9zi9FS2crn7RW5 EvfAEgdWP2UX8wOrPzmut78mxm/cpmU8+jH8HHmOnQ3tuq3NTuUZbXAPx mIKxaz36Glz+n16G+Pl08PrfqgfIlDGtfGnGOHd97V6ClBU4V/AkmuHQ2 3mobb+AxhRywyK19DIWyT/3kNkef1yHLTyPUVK79plsFFj2u5ZfcU15G6 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10616"; a="329043683" X-IronPort-AV: E=Sophos;i="5.97,287,1669104000"; d="scan'208";a="329043683" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2023 04:56:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10616"; a="776913014" X-IronPort-AV: E=Sophos;i="5.97,287,1669104000"; d="scan'208";a="776913014" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by fmsmga002.fm.intel.com with ESMTP; 10 Feb 2023 04:56:11 -0800 Date: Fri, 10 Feb 2023 05:05:56 -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: <20230210130556.GA8447@ranerica-svr.sc.intel.com> References: <20230207045838.11243-1-ricardo.neri-calderon@linux.intel.com> <20230207045838.11243-5-ricardo.neri-calderon@linux.intel.com> <20230210004333.GA6166@ranerica-svr.sc.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 Fri, Feb 10, 2023 at 09:41:14AM +0100, Peter Zijlstra wrote: > On Thu, Feb 09, 2023 at 04:43:33PM -0800, Ricardo Neri wrote: > > 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. > > Yeah, so? If its a recurring expression a helper never hurts. Ah! I get your point now. You meant a helper function. Thank you for the clarification. Sure! I can add this helper function.