Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8571480ybn; Tue, 1 Oct 2019 09:59:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEd4ePiBrgA06GbSlb0iN23OmbN0vrv90O+2QleWu2A7KiCdb+uXaiDsC05D9wsJZEhdGu X-Received: by 2002:a05:6402:1855:: with SMTP id v21mr27237409edy.242.1569949183936; Tue, 01 Oct 2019 09:59:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569949183; cv=none; d=google.com; s=arc-20160816; b=tSdtjZcwW5Sq6+W4RJk2sq5W4/vEK3zrRvFyFO4PqN25bSVfFOeqyxwosN+O0ufaYs x8YcfYPpDHdrsg6T7d/WaP/9UzC5Mc3laQd3cxo+g+a66qOM0dP4tt2PjPGhcynmJD8s m70aBQTAiKRTqNAuN9VB1Wd0OIKrGf2hrpEa/r1miCqXMgLvSG3uFdrSriMuFJDbY/5J ovxz81CKOM0JRKB/BzvjvHv3cFfxUrLi1GWuhQUUTP+GvG6wXwF0RaexzZXJWnhcARhE DK/zsuvWd2jjaL744Jwa/JHaaL9PAhxzAgRobi1ulsCmLiwlMI91fq5L904I05N+IE00 GLjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=D0r3zi5BN2/7BcLtfOtHPQG2ON+Xm0N1CDVGbqx7iBc=; b=vgF55B7SvL+xjOLBtD79KYJ8S2dLD1PLK3SEocke1zU3iFMQ4E/ZN8VmXG5Z/9joT6 DFVPofi4AC64Q1GMjQ3hni33hSPgNRAuuHv/IoTT2Ch04YJlajvRttR7ZnWp9UnVK9sW bZQIkVaeftfP2HTbsN7Abq71MsskSCh4pp5+MsUQAMTrDvZCN7j1Z2WPreF2oib6ir9Q mlBLv9xiU/SZ2DtHqL3HJn3JmABW9r7cVutJA3cJEg5p8CMyr8Et9RqauiaVjpABi55q dt1ct8JPieE9ODmXfT7rhZC+HJZIgAC7Cz7jFA+bB3b66hCe9lv63GljLiIYwF/599c7 iBJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g15si9362493edm.349.2019.10.01.09.59.19; Tue, 01 Oct 2019 09:59:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731527AbfJAQ5R (ORCPT + 99 others); Tue, 1 Oct 2019 12:57:17 -0400 Received: from foss.arm.com ([217.140.110.172]:54326 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726403AbfJAQ5N (ORCPT ); Tue, 1 Oct 2019 12:57:13 -0400 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 15EA71570; Tue, 1 Oct 2019 09:57:13 -0700 (PDT) Received: from [192.168.0.9] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7B9613F706; Tue, 1 Oct 2019 09:57:11 -0700 (PDT) Subject: Re: [PATCH v3 04/10] sched/fair: rework load_balance To: Vincent Guittot Cc: linux-kernel , Ingo Molnar , Peter Zijlstra , Phil Auld , Valentin Schneider , Srikar Dronamraju , Quentin Perret , Morten Rasmussen , Hillf Danton References: <1568878421-12301-1-git-send-email-vincent.guittot@linaro.org> <1568878421-12301-5-git-send-email-vincent.guittot@linaro.org> <46e81a81-f88e-c935-d452-9b746bde492b@arm.com> From: Dietmar Eggemann Message-ID: <36d904ff-44fa-a561-677d-4858d5921b69@arm.com> Date: Tue, 1 Oct 2019 18:57:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/10/2019 11:14, Vincent Guittot wrote: > group_asym_packing > > On Tue, 1 Oct 2019 at 10:15, Dietmar Eggemann wrote: >> >> On 19/09/2019 09:33, Vincent Guittot wrote: >> >> >> [...] >> >>> @@ -8042,14 +8104,24 @@ static inline void update_sg_lb_stats(struct lb_env *env, >>> } >>> } >>> >>> - /* Adjust by relative CPU capacity of the group */ >>> + /* Check if dst cpu is idle and preferred to this group */ >>> + if (env->sd->flags & SD_ASYM_PACKING && >>> + env->idle != CPU_NOT_IDLE && >>> + sgs->sum_h_nr_running && >>> + sched_asym_prefer(env->dst_cpu, group->asym_prefer_cpu)) { >>> + sgs->group_asym_packing = 1; >>> + } >>> + >> >> Since asym_packing check is done per-sg rather per-CPU (like misfit_task), can you >> not check for asym_packing in group_classify() directly (like for overloaded) and >> so get rid of struct sg_lb_stats::group_asym_packing? > > asym_packing uses a lot of fields of env to set group_asym_packing but > env is not statistics and i'd like to remove env from > group_classify() argument so it will use only statistics. > At now, env is an arg of group_classify only for imbalance_pct field > and I have replaced env by imabalnce_pct in a patch that is under > preparation. > With this change, I can use group_classify outside load_balance() OK, I see. This relates to the 'update find_idlest_group() to be more aligned with load_balance()' point mentioned in the cover letter I assume. To make sure we can use load instead of runnable_load there as well. [...]