Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp985638pxb; Fri, 15 Apr 2022 17:27:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+YGhNLzxf5nWr9iKdzLUMe0WT3ZEM88+DafHAYPo7Zm0RVdEOHeJqCbHbv8kYksLCu4Sg X-Received: by 2002:a17:90b:19d7:b0:1c7:3413:87e0 with SMTP id nm23-20020a17090b19d700b001c7341387e0mr1472178pjb.132.1650068838362; Fri, 15 Apr 2022 17:27:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650068838; cv=none; d=google.com; s=arc-20160816; b=epqKYGmORC3VeozS02YasMTh3EjIy5oHKSaGLInXwzPCkveFjDnDXC767r5etEFHgD TklTTJ+2kMdC//bTYwc2oyMg4Md1kEYxuTAEoLpixJ+Q5CcXlrlYXi+LBN8CbzecpvVP iHq2FKRDOiDjaIWS4ivo6bYAyhwCKb+52xCQ9faSt2+ki5WDecOBeEDjE1Ze/0j0mXNF ERIPBAbfye9qAGkzyaP1x6KUK186CBb10Tf+wA91VNgOohnbCXnEYVw/8bTc1bTDjPUN s+YNCUno2iHLXbuAkqVoZJDtM7vmcbqqRbQo6Eu1v4MMKHHU0CuaxFx81+ZWUlymsu6M 55MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:to:subject:from:user-agent:mime-version :date:message-id; bh=adt9TFbOeBoEDP6YUQNkYNKph0NT7qzg6xD/eRT0pN4=; b=lzzGDZJ/6q23ZTNXBwEJDiuf0Kp6G4+JFmkpAyKXA9WVvViI9BS9zwjC6vtgjXg3hf iSfbzTX/KRfB0443mLeD4TN2V9vL4vz7tcMOOf6kQdBHMgKsimZ4dr2mGOZdlm9aN9k2 aETaq++T4Ij3Jy69aJd32dnfJDFFCK7hdu7HXIQ1REc2lJIVyDod6TE6VM8fwQASGLFQ JGYljclvSCni/6gkmow0+D3/t9GO5hMq0ctlUz3sYcRn5ye4WcvlPPCXw6ntzufjjwZZ xTXRY8LaX6Z0AZsMIV8BXJ3dFw8BJhx792IPWqnKsk+wr0CwypoZCcFAsR2ii9b5SJPQ ibbg== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n4-20020a170902e54400b00156a2c84fc8si2795317plf.617.2022.04.15.17.27.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:27:18 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 613ABD598D; Fri, 15 Apr 2022 17:25:05 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241269AbiDNKf6 (ORCPT + 99 others); Thu, 14 Apr 2022 06:35:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239293AbiDNKfw (ORCPT ); Thu, 14 Apr 2022 06:35:52 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8526C6D39B for ; Thu, 14 Apr 2022 03:33:27 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A559A139F; Thu, 14 Apr 2022 03:33:27 -0700 (PDT) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3B0413F5A1; Thu, 14 Apr 2022 03:33:27 -0700 (PDT) Message-ID: Date: Thu, 14 Apr 2022 12:33:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 From: Dietmar Eggemann Subject: Re: [PATCH] sched/fair: Revise comment about lb decision matrix To: Tao Zhou , linux-kernel@vger.kernel.org References: <20220403175946.7323-1-tao.zhou@linux.dev> Content-Language: en-US In-Reply-To: <20220403175946.7323-1-tao.zhou@linux.dev> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 03/04/2022 19:59, Tao Zhou wrote: > 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 > --- > 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 5146163bfabb..5765d96202c7 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -9441,7 +9441,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 You should put people you find in `./scripts/get_maintainer.pl kernel/sched/fair.c` on To/Cc to attract more attention. Otherwise, LGTM. Reviewed-by: Dietmar Eggemann