Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp988976pxb; Fri, 15 Apr 2022 17:33:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMDKH37g2OKZhqYGOUewHCnH8ueP0BUgVE+pR5Dc7+m0BXZ4slUcaC/w7jHO1h9BJaYogU X-Received: by 2002:a05:6a00:996:b0:505:b6d2:abc8 with SMTP id u22-20020a056a00099600b00505b6d2abc8mr1544114pfg.11.1650069219214; Fri, 15 Apr 2022 17:33:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650069219; cv=none; d=google.com; s=arc-20160816; b=SeT9gyaNb2qqkvEPtr5CE+YkiXR0Ew+RHvlfforCdk5dgryEJ4GZRI2Ts9V9cPvRlX 0Y5u1vFXFt523ttvPftg9htuzkXxc8CdLY4SHtM+s4m7IVVCmG5035tEtEv15qgGjmmV DvoXNtz8FnY6k9GVxrXUeJWE2weec5JaahKimvnNAx5knyyG7NLUMBH8qZ1aqsY9sjKY UoT1DmfgyCQ/LC9Hhpjz3aFYk++gRf1525N0IlQMjhBObmxaXRWKVkHPvVonNanHNkFE oOnAlQA1IyuodyF8OeBIKEkZ/dZizGN53VQoX5BPMztRjIBEi6p+DbjBwim49P6RwVv9 ERfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Id7F0bBZwbU+kl7Y3j+XMtZvdbjgCDi5TDTPOpN4GdU=; b=0DjDB/wyO1mIzNwaQbS9wXG8rTB2hvAxqnnHLwREaKzGP99CZzbieZPT8ABN0aLWrm z46AP61GUYTO21Q9SiwCg9GcxynDCwK1yBYLPB8Gj9uoXGI4eawoNEFXCfrnZiM5j58V qNvQhhExH/pBlCyiuqVabyJ/h++PAVErv1g1mdTRIJEO2EF6AaJjsm2vGo0+9FWib0En GZFUFSGAqn4E3VFbOA7zAjg7GWGtwOdJDTm3lrpzHgyM4yQ0AzHLKz22h0lhc1a87CUu H5u3uqo5hblFMn9VLqEfGyVRWK7U9i+yLOvrn1gJfVSv2d87TKSFLjQwG/NjCJL9YShR cLGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Zk4aoDHI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i8-20020a170902c94800b00156c05b9a7dsi3180349pla.18.2022.04.15.17.33.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:33:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Zk4aoDHI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D01B9CFB90; Fri, 15 Apr 2022 17:29:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351917AbiDOJ5N (ORCPT + 99 others); Fri, 15 Apr 2022 05:57:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348693AbiDOJ5L (ORCPT ); Fri, 15 Apr 2022 05:57:11 -0400 Received: from out2.migadu.com (out2.migadu.com [IPv6:2001:41d0:2:aacc::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E6D46363 for ; Fri, 15 Apr 2022 02:54:41 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1650016479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Id7F0bBZwbU+kl7Y3j+XMtZvdbjgCDi5TDTPOpN4GdU=; b=Zk4aoDHIpJJgbvB00NtqUzwl4Qhff2grUyVx5+Yb6YblUYbAS9Y8jo98SPFAHfUYkiZnS1 mivhOXdh2sQIViWYXw/UF0cmYKRSgXBWKRSJHFV5OdKDtLO10KSECKZqEc0M5SL7npyqtm l1sCbefWqNgc0GlM83W4uIOZTiykzg0= From: Tao Zhou To: LKML , Tao Zhou Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Morten Rasmussen , Valentin Schneider Subject: [PATCH V1 RESEND]: sched/fair: Revise comment about lb decision matrix Date: Fri, 15 Apr 2022 17:55:04 +0800 Message-Id: <20220415095505.7765-1-tao.zhou@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 If busiest group type is group_misfit_task, the local group type must be group_has_spare according to below code in update_sd_pick_busiest(): if (sgs->group_type == group_misfit_task && (!capacity_greater(capacity_of(env->dst_cpu), sg->sgc->max_capacity) || sds->local_stat.group_type != group_has_spare)) return false; group type imbalanced and overloaded and fully_busy are filtered in here. misfit and asym are filtered before in update_sg_lb_stats(). So, change the decision matrix to: busiest \ local has_spare fully_busy misfit asym imbalanced overloaded has_spare nr_idle balanced N/A N/A balanced balanced fully_busy nr_idle nr_idle N/A N/A balanced balanced misfit_task force N/A N/A N/A *N/A* *N/A* asym_packing force force N/A N/A force force imbalanced force force N/A N/A force force overloaded force force N/A N/A force avg_load Fixes: 0b0695f2b34a ("sched/fair: Rework load_balance()") Reviewed-by: Dietmar Eggemann Signed-off-by: Tao Zhou --- v1 changelog: (1) Send to MAINTAINERS/REVIEWS get from `./scripts/get_maintainer.pl` suggested by Dietmar Eggemann. (2) Based on v5.18-rc2 v1->v2 changelog: (1) Add Reviewed-by from Vincent Guittot. (2) This behavior has changed with cad68e552e77 ("sched/fair: Consider misfit tasks when load-balancing") and the matrix has not changed. Add the related people of commit cad68e552e77 to the cc list. kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index d4bd299d67ab..b8c67e7c8cf3 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9495,7 +9495,7 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s * busiest \ local has_spare fully_busy misfit asym imbalanced overloaded * has_spare nr_idle balanced N/A N/A balanced balanced * fully_busy nr_idle nr_idle N/A N/A balanced balanced - * misfit_task force N/A N/A N/A force force + * misfit_task force N/A N/A N/A N/A N/A * asym_packing force force N/A N/A force force * imbalanced force force N/A N/A force force * overloaded force force N/A N/A force avg_load -- 2.35.2