From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A679C433B4 for ; Tue, 6 Apr 2021 13:08:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C1FE7613C6 for ; Tue, 6 Apr 2021 13:08:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242350AbhDFNIH (ORCPT ); Tue, 6 Apr 2021 09:08:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232492AbhDFNIF (ORCPT ); Tue, 6 Apr 2021 09:08:05 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 094CFC06174A for ; Tue, 6 Apr 2021 06:07:57 -0700 (PDT) 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=8/xaxLHR6n03/FPfkB/ueROTepgwsZt0N+t/P6W8Crc=; b=pP+Vwozp2pDlGvkJRd9fOuJVyu YFdFrinNiV/263xPtsEc4Jq7qFk5xH3xF+bUB1oj0r3HTLTXYEuiyWKhucISmZRYirgh1E12PD2A9 9lce97dVjzzS8R76LnkWh8M9StXCjpGg8sK9a2hrnn0XzKq/EZ0WvRXoxkf0lUlgbPHTn6C6piqNp NHnmLN/H5HUa3pP144kujvUAyGgyTK9/ERqTxhimZmLLL7hbACqttTIcAojXNkX+dNfwr7PG6z51R hra79wMkB4jiYocq0cy10rpNtKIzw62ZqU5JqgkIpSxXjrJW5kIjl5fJ+tgY8az2WlDmfsMJhnvN6 2YAvBNQA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lTlPY-00CpnV-I2; Tue, 06 Apr 2021 13:06:33 +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 (2048 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 06604301179; Tue, 6 Apr 2021 15:06:23 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 9805C2C1D2B54; Tue, 6 Apr 2021 13:17:28 +0200 (CEST) Date: Tue, 6 Apr 2021 13:17:28 +0200 From: Peter Zijlstra To: Ricardo Neri Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Len Brown , Srinivas Pandruvada , Tim Chen , Aubrey Li , "Ravi V. Shankar" , Ricardo Neri , Quentin Perret , "Joel Fernandes (Google)" , linux-kernel@vger.kernel.org, Aubrey Li , Ben Segall , Daniel Bristot de Oliveira Subject: Re: [PATCH 3/4] sched/fair: Consider SMT in ASYM_PACKING load balance Message-ID: References: <20210406041108.7416-1-ricardo.neri-calderon@linux.intel.com> <20210406041108.7416-4-ricardo.neri-calderon@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210406041108.7416-4-ricardo.neri-calderon@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 05, 2021 at 09:11:07PM -0700, Ricardo Neri wrote: > @@ -8507,6 +8619,10 @@ static bool update_sd_pick_busiest(struct lb_env *env, > if (!sgs->sum_h_nr_running) > return false; > > + if (sgs->group_type == group_asym_packing && > + !asym_can_pull_tasks(env->dst_cpu, sds, sgs, sg)) > + return false; All of this makes my head hurt; but afaict this isn't right. Your update_sg_lb_stats() change makes that we unconditionally set sgs->group_asym_packing, and then this is to undo that. But it's not clear this covers all cases right. Even if !sched_asym_prefer(), we could end up selecting this sg as busiest, but you're just bailing out here.