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 38275C636CD for ; Fri, 10 Feb 2023 08:41:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231538AbjBJIls (ORCPT ); Fri, 10 Feb 2023 03:41:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231515AbjBJIlq (ORCPT ); Fri, 10 Feb 2023 03:41:46 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75C255D3EA for ; Fri, 10 Feb 2023 00:41:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=khMnYDc7UOKzbX3CCDSAj+Wo4i4NAPcutmfg9CiymIE=; b=nLCfmHjeWTrPVt5mxMrFljm35K C1CfDOlR2U0qnY3a6JZLa8Liyq9JwItNQPVtUJE5neYZD4nU9UuY/vXlIXRQmgZi0e5bANWUeVQ7V QadqHXt7MImOlOwlCrpGZDB9Is0KXerOLbsVsxDPJCNvoQjTRcoyq5ikZbBMt+bweLl1wFlzKXYu0 87kIqtOkoOenevkTJek4xufxQQnlUZePT+PSlFsjPHRNndOiXcVxxni10BICC40pawlw4mJHuMnL2 Lnp3P/YtriqTcxfJHnuFDoTFAvPR/i5ShywQr7KNlH6eotNsB71mEA50mQWnwzHm7+OSA+UDKZPeX QvnQXcfw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQOy7-002xRd-7y; Fri, 10 Feb 2023 08:41:19 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 598043003E1; Fri, 10 Feb 2023 09:41:15 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0859B2061BB0F; Fri, 10 Feb 2023 09:41:15 +0100 (CET) Date: Fri, 10 Feb 2023 09:41:14 +0100 From: Peter Zijlstra To: Ricardo Neri 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: 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: <20230210004333.GA6166@ranerica-svr.sc.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.