Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp746396pxy; Thu, 22 Apr 2021 12:23:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2mV4qQSR4edLNgBVXrxeGAHpGCCPilUNhPDk76BBGdTLJK0R0Yoe1RtDBZdB9yr3XgR7M X-Received: by 2002:a17:907:9691:: with SMTP id hd17mr219000ejc.205.1619119402764; Thu, 22 Apr 2021 12:23:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619119402; cv=none; d=google.com; s=arc-20160816; b=ERzOFpRO5J/IXEJVEtUud76j77RQZi3yy0qPBZkqT8YyvvsfYd7hxC9dhX1OJU6jNb dr33Gjef1jqUR6Zk9CnIo3nYExC7S3HGNqcrq6vJfSbLdmGfnN22sVPz6Ypt3NYHupW8 mX8sx+/BCECLlsDLssaLM/RRJ1HKY166WeX5F5D+TPrzEioWgRrt/jf6+5T2ZHH5zHXv IdX7rx5/2DIq8lBfWIMHhqyZGE6PUWkfdrdXayScodWqeM9951pOoF7BNp0MrAmLMeFF LpBSrBzBFh5HRoLeb+rcVdCGCDBGGJTy1kQhNLcyMv1gUj+bFOv1ibhEd/1CX2VfjI30 SOHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=0pOaZg9ZcRsL5kdLXXL5vkzxCGoegq4/AUDP+/5jKeM=; b=YpvEm9dBFtU6Nk0GtbfamqmV343bF2WkZLvod83UpJfTPa8iLteOj9/OZcjW66fEfv G1XZggKqzeRZpQ648wUZ92yput2ZTSznlDJXjxH4NqPco9OfR15TOklO9a4rHixCARee 4BOR30blnOwRH6SYn/yFJzqnvUL7zUpdVFSLTwBgrkvo4xE0pCjWO+pLib2gtB2rdx+W mMYOk6acZUUGEZ1u8Qrs+QDn+pppW8KaZOP3CX5dfhn3U2vSfUfKhk5tEBML4su7+8jm /gGKZD8zDnPPluqE3hLMs68dDwob+H5o1fEd/TY+NtIaVo6aaq+EkjvgcPzmQiJ4TTsS FkMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m7si3252602edd.486.2021.04.22.12.22.58; Thu, 22 Apr 2021 12:23:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238818AbhDVTUM (ORCPT + 99 others); Thu, 22 Apr 2021 15:20:12 -0400 Received: from foss.arm.com ([217.140.110.172]:55162 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236665AbhDVTUM (ORCPT ); Thu, 22 Apr 2021 15:20:12 -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 DE2B811D4; Thu, 22 Apr 2021 12:19:36 -0700 (PDT) Received: from e113632-lin (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 702183F694; Thu, 22 Apr 2021 12:19:35 -0700 (PDT) From: Valentin Schneider To: Dietmar Eggemann , linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Ingo Molnar , Vincent Guittot , Morten Rasmussen , Qais Yousef , Quentin Perret , Pavan Kondeti , Rik van Riel , Lingutla Chandrasekhar Subject: Re: [PATCH 1/2] sched/fair: Filter out locally-unsolvable misfit imbalances In-Reply-To: <519f7b86-851b-24f7-39aa-4bbdce5c7cd3@arm.com> References: <20210415175846.494385-1-valentin.schneider@arm.com> <20210415175846.494385-2-valentin.schneider@arm.com> <519f7b86-851b-24f7-39aa-4bbdce5c7cd3@arm.com> Date: Thu, 22 Apr 2021 20:19:30 +0100 Message-ID: <87r1j2t9dp.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/04/21 11:48, Dietmar Eggemann wrote: > On 15/04/2021 19:58, Valentin Schneider wrote: > > [...] > >> Aggregate a misfit task's load into sgs->group_misfit_task_load only if >> env->dst_cpu would grant it a capacity uplift. >> >> Note that the aforementioned capacity vs sgc->max_capacity comparison was >> meant to prevent misfit task downmigration: candidate groups classified as >> group_misfit_task but with a higher (max) CPU capacity than the destination CPU >> would be discarded. This change makes it so said group_misfit_task >> classification can't happen anymore, which may cause some undesired >> downmigrations. >> >> Further tweak find_busiest_queue() to ensure this doesn't happen. > > Maybe you can describe shortly here what's the new mechanism is you > replace the old 'prevent misfit task downmigration' with. > Will do. > Also note >> find_busiest_queue() can now iterate over CPUs with a higher capacity than >> the local CPU's, so add a capacity check there. > > [...] > >> +static inline void update_sg_lb_misfit_stats(struct lb_env *env, >> + struct sched_group *group, > > Seems to be not used. > Right, that's an update_sg_lb_stats() copy/paste fail :-) > >> @@ -9288,6 +9310,8 @@ static struct sched_group *find_busiest_group(struct lb_env *env) >> if (!sds.busiest) >> goto out_balanced; >> >> + env->src_grp_type = busiest->group_type; > > Maybe a short comment why you set it here in fbg(). It's only used later > in fbq() for asym. CPU capacity sd but is set unconditionally. > Seeing as almost every other line there has an accompanying comment, I think I'll do that. > [...]