Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1030951pxb; Fri, 15 Apr 2022 18:58:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfqDNjCdMNmkSd1QxfAtNfbnio9YlD0j/xhpi6hsIj0YX6hgnFxHDl3a83ZqCxLwae4wBc X-Received: by 2002:a17:90b:352:b0:1c6:77e:a4f7 with SMTP id fh18-20020a17090b035200b001c6077ea4f7mr7020569pjb.77.1650074306361; Fri, 15 Apr 2022 18:58:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650074306; cv=none; d=google.com; s=arc-20160816; b=z36vPrX5I5E1Op93otTVuEuZvc7zkHOb/WSydM1BZsNQsgmQINxzJkXh0AFVeOUO7N CjqzJrcvRX58hyjfNE8RANgwNsH1grMY2HMQujlwQXR+JG1TRwMyV0FIzv3aVdM2y+mh PmzgUkLweK4U9QxaLda06nbYluavIxnQkbmdekTu0JpVF7b/jPVhtV6lyrlo1AJpe9BE dQOKv3LEyFLlLxlaVqZiArAWlwGbUX+KZPBgNL628336h6q7chA1myczYqqPE7glt3wJ nRWGmkiXh+MAsLpcv4vp+WBMOTWlXV6u77RlvlZWlf7d4wiYeCbhy+xyyjQHtAnrwjKr 3JMQ== 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:dkim-signature:date; bh=l24SRURrZaOrna4LFT1+c4+6yM66QDm3iL5iU6iEqm4=; b=z1AHWlViIE547Kp2YWF9dLQbuymaQ1AtkjMLwwc1iURtVC5gpdR/68O7ACCWKDeuJ2 e6Cd1Hj9luY1mcjL9ZFsB5wYxL/95QSLO4BFo/gg+/8MP/Bp+6SjqV5RTVXeGHNzUhyl NIGiO8utAzAEtnJ5aChsivg8aI4+zwkUfRZ7OFps8Haop/k1r/tOUus0IkZswFPag4y8 TbE6sVVcS3eUBkp/mKNrA0DdIt8zZO+7P4dHnLNhFd0/TgZ4Edl+487aeBKm6nQaBJCN 31vnVnVP/YWgdzKf2vNfaohwEzqN4fMiGgElY4BO7OVWS2UbaAZxc5iaM4rxoMzlkcgA Joyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=oPTcnvzL; 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 w9-20020a170902e88900b00153b2d1649bsi2781149plg.163.2022.04.15.18.58.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 18:58:26 -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=oPTcnvzL; 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 B13461AC42A; Fri, 15 Apr 2022 18:18:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352058AbiDOKE7 (ORCPT + 99 others); Fri, 15 Apr 2022 06:04:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231634AbiDOKE5 (ORCPT ); Fri, 15 Apr 2022 06:04:57 -0400 Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19316BB08A for ; Fri, 15 Apr 2022 03:02:28 -0700 (PDT) Date: Fri, 15 Apr 2022 18:03:05 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1650016946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=l24SRURrZaOrna4LFT1+c4+6yM66QDm3iL5iU6iEqm4=; b=oPTcnvzL0dwOgR4bzD6k9/ZTKFj2jRMGsds+bT1fsJMJ1EHhZbT0MthNTIb8hMENs04fOK os/HPIqY0SE4keuIX+k26bhGdKHgmXp6K3twKJD+VE9EH36LhBmSi+o+1pxV2UHueiPRTx GGBKOlAS1zjF4vBWHBxYm4JvRPx1kfw= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Tao Zhou To: Vincent Guittot , Tao Zhou Cc: LKML , Ingo Molnar , Peter Zijlstra , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira Subject: Re: [PATCH V1 RESEND]: sched/fair: Revise comment about lb decision matrix Message-ID: References: <20220415022246.14902-1-tao.zhou@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Fri, Apr 15, 2022 at 10:32:09AM +0200, Vincent Guittot wrote: > On Fri, 15 Apr 2022 at 04:22, 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(). > > The behavior has changed with > cad68e552e77 ("sched/fair: Consider misfit tasks when load-balancing") > But we haven't updated the matrix > > Reviewed-by: Vincent Guittot I send a version just now but forget to change the version number. Thanks, Tao > > 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 > > > > > > 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 > >