Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp616703rwb; Thu, 6 Oct 2022 01:57:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM61Q7FKgEyx2kFgElKfNg4yGQTnEQxTnyMVmLWpjsgkxXfUTjiY6wAQRb0fWdrmqxU1aCa8 X-Received: by 2002:a17:90a:1c02:b0:1e0:df7:31f2 with SMTP id s2-20020a17090a1c0200b001e00df731f2mr9209780pjs.222.1665046663340; Thu, 06 Oct 2022 01:57:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665046663; cv=none; d=google.com; s=arc-20160816; b=DzJR1Ft0gkprNf8sHBdhVW8ksOMLb+iW+A6MaOhJCIOz+qVNLotRg2kvrONO5fP+a1 UIaVBjvnwTYvK+4GyKpqkslZPDxpKjS766cTfQVY1qZ1uD2Q3YwW0E57L/y+OpKKTCMm ck7IC21L/xIR2lH0082mn1LtFyK4LF53oVn5pqEFbIchV8xqw6WGJElN/ApoXWj0HnoG MaHSJnD4tllHIO0Ibcv9B/orZ5ii+QnOVqgEys9Cbn75JLqVxjvLFxwFBFFBsTtJuyZk V0NE6sU/aj5EdQ9OT81eAFQiJw8PyN5RgmoB6aAL/fWXazbBbKULcMzB1zOE7X5p1m21 steQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FWnh2nRUzUZJtkd+A+vEExHBGPHX7Dn2QYhmXJ60jW8=; b=a6hf70tGtayTSMrnNTPCozq7xpm/1Wu0yf01ISVwiTkE9z+R9+v5aRI68PurChMG4K 5H8JOsSPKo+PXrZpYEq1l4/4WGmlh+J2LCXwEf8V6kwXIYJavH2AcDTIa3v/cDo5L0cd HFe6/YNDc/HQHjpdkIaiWkWLk4PncaUuGfykPOtQljXcIXMdP7cl6yal81QYz0VIMJX/ iUj4Yl76kzuvtZpMVPULuST+1+US8t9lKAx5gMzf5dhAmahJhoJcx9vnBnyt6R+8JH8J VeK3rXqdbT0q/JtvJkcVWcVSeDa5VpLu0/JVAEe8d6S/2wBO/2+QUD0ZtiD2jVmMZeAu 5JQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=PHUILb2j; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u2-20020a056a00158200b00561cb07c77csi3890649pfk.232.2022.10.06.01.57.30; Thu, 06 Oct 2022 01:57:43 -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=@infradead.org header.s=casper.20170209 header.b=PHUILb2j; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231187AbiJFIiQ (ORCPT + 99 others); Thu, 6 Oct 2022 04:38:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230280AbiJFIiO (ORCPT ); Thu, 6 Oct 2022 04:38:14 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04F2A95AD5 for ; Thu, 6 Oct 2022 01:38:10 -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=FWnh2nRUzUZJtkd+A+vEExHBGPHX7Dn2QYhmXJ60jW8=; b=PHUILb2jzd4OgU4iB2UTeoJEG1 7TbV874gV3PDTHVOx3Loff2ZOvwxN+qU/zLvHXoDySBGhZmIDhYtV4/ItH8y6YkD4dWQHrXyAvCE8 dwCJBU7uraB5qGi7sgTnf0E4a7WTue/jmRpv4ubJQ9Y2GGNcEVMv1jCtA/ZAHfyyBZMsqES7iXtyD EHKf+iFM1vpizuZPZiYWehPyV+qy+UhUNYJelg81cmRKIVpNcrnNYLqP4QZQumcynds3vW0SNItOF 4ZkKlO0azDiyL0KPAVXgiOZaY1bCrAAF//dHnTuVazBaKmomBECVGEfP+nGtkVQkQ9WSxkGfds1EB 9h/Lm1Ww==; 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 1ogMOC-0010Tj-Mm; Thu, 06 Oct 2022 08:37:56 +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)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 8C7E33001D6; Thu, 6 Oct 2022 10:37:52 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 73AAB201FC2CE; Thu, 6 Oct 2022 10:37:52 +0200 (CEST) Date: Thu, 6 Oct 2022 10:37:52 +0200 From: Peter Zijlstra To: Ricardo Neri 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 , Tim Chen , Valentin Schneider , x86@kernel.org, linux-kernel@vger.kernel.org, "Tim C . Chen" Subject: Re: [RFC PATCH 09/23] sched/fair: Use task-class performance score to pick the busiest group Message-ID: References: <20220909231205.14009-1-ricardo.neri-calderon@linux.intel.com> <20220909231205.14009-10-ricardo.neri-calderon@linux.intel.com> <20221005233841.GA29251@ranerica-svr.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221005233841.GA29251@ranerica-svr.sc.intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE 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 Wed, Oct 05, 2022 at 04:38:41PM -0700, Ricardo Neri wrote: > On Tue, Sep 27, 2022 at 01:01:32PM +0200, Peter Zijlstra wrote: > > On Fri, Sep 09, 2022 at 04:11:51PM -0700, Ricardo Neri wrote: > > > @@ -9049,6 +9111,12 @@ static bool update_sd_pick_busiest(struct lb_env *env, > > > /* Prefer to move from lowest priority CPU's work */ > > > if (sched_asym_prefer(sg->asym_prefer_cpu, sds->busiest->asym_prefer_cpu)) > > > return false; > > > + > > > + /* @sg and @sds::busiest have the same priority. */ > > > + if (sched_asym_class_pick(sds->busiest, sg, &sds->busiest_stat, sgs)) > > > + return false; > > > + > > > + /* @sg has lower priority than @sds::busiest. */ > > > break; > > > > > > case group_misfit_task: > > > > So why does only this one instance of asym_prefer() require tie > > breaking? > > This is the only place in which two sched groups with running tasks and of > equal priority are compared. > > In all other places sched_asym_prefer() is used to compare the destination > CPU with others. Since asym_packing is done only when the destination CPU is > idle, there is no need to break this tie. That would make for a fine comment, no? Because as presented one is left wondering, why if asym_prefer() needs tie breaking, only this one site needs it. > > And while looking through this, I must ask about the comment that goes > > with sched_set_itmt_core_prio() vs the sg->asym_prefer_cpu assignment in > > init_sched_groups_capacity(), what-up ?! > > Are you referring to this comment? > > "No need to rebuild sched domain after updating > the CPU priorities. The sched domains have no > dependency on CPU priorities" > > If yes, then it looks wrong to me. Sched domains are rebuilt after updating > priorities. Right.