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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 E16CEC433E6 for ; Fri, 8 Jan 2021 14:38:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AA0D5238A1 for ; Fri, 8 Jan 2021 14:38:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727468AbhAHOhm (ORCPT ); Fri, 8 Jan 2021 09:37:42 -0500 Received: from foss.arm.com ([217.140.110.172]:52174 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727242AbhAHOhl (ORCPT ); Fri, 8 Jan 2021 09:37:41 -0500 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 B3548ED1; Fri, 8 Jan 2021 06:36:55 -0800 (PST) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 620963F70D; Fri, 8 Jan 2021 06:36:54 -0800 (PST) From: Valentin Schneider To: Vincent Guittot Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , linux-kernel Subject: Re: [PATCH 3/3 v2] sched/fair: reduce cases for active balance In-Reply-To: References: <20210107103325.30851-1-vincent.guittot@linaro.org> <20210107103325.30851-4-vincent.guittot@linaro.org> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Fri, 08 Jan 2021 14:36:47 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/01/21 09:11, Vincent Guittot wrote: > On Thu, 7 Jan 2021 at 18:40, Valentin Schneider > wrote: >> >> On 07/01/21 13:20, Vincent Guittot wrote: >> > On Thu, 7 Jan 2021 at 12:26, Valentin Schneider >> > wrote: >> >> > @@ -9499,13 +9499,32 @@ asym_active_balance(struct lb_env *env) >> >> > } >> >> > >> >> > static inline bool >> >> > -voluntary_active_balance(struct lb_env *env) >> >> > +imbalanced_active_balance(struct lb_env *env) >> >> > +{ >> >> > + struct sched_domain *sd = env->sd; >> >> > + >> >> > + /* >> >> > + * The imbalanced case includes the case of pinned tasks preventing a fair >> >> > + * distribution of the load on the system but also the even distribution of the >> >> > + * threads on a system with spare capacity >> >> > + */ >> >> >> >> Do you mean s/imbalanced/migrate_task/? This part here will affect >> >> group_imbalanced, group_asym_packing, and some others. >> > >> > I really mean the imbalanced case which refers to the function name >> > and includes: >> > - the pinned tasks case aka group_imbalanced and which is the primary >> > target of this function ( which explains its name) >> > - but also the case where we want to evenly spread tasks on system >> > with spare capacity and removed this imbalance >> > >> >> But can't this also affect other group_types? calculate_imbalance() can >> set >> >> env->migration_type = migrate_task; >> >> for >> >> busiest->group_type > group_fully_busy > > yes but we are still in the case of evenly spread tasks on system with > spare capacity. Also, this is already the behavior for such cases. Ah, I was parsing 'imbalance' as 'group_imbalance' and didn't read your 'evenly spread tasks' description as accounting this case. Reviewed-by: Valentin Schneider