Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp233295pxb; Fri, 16 Apr 2021 04:25:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTnTv/GblHl0wnpaEcKGX43Nzh3WB11SnSZPpM79dY3JKQS/MyGA0oATGx2S2V+JIEqW42 X-Received: by 2002:a17:90a:db49:: with SMTP id u9mr9223915pjx.196.1618572314799; Fri, 16 Apr 2021 04:25:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618572314; cv=none; d=google.com; s=arc-20160816; b=dWqnEwnfVQ7bWpC0m9oOYATzsoslAmvUsYIcistlIghLtXCbLZLpvdznp8FEfehmYm m3ViIyOjIwddsQ+PfMMH+hNT8SbjWAlkg3daFaqx7TMYKCNwMH1WEnRA3nIPjFsBB8q2 cbkomfTsHTYWCUkUn209lX5RzEov/VtCliq0gWkCPrHOCYBQ756DurhQzz9g7nJLmYqj ax+nJtfp3ucrZl6ZqG3LSGaQGWliMnJFg97swGyU+5M5o+pSI4wCuQjaIbK/RStYOMe/ NyenxJvq9asHqFULwDNo4HoHrF650o7mun/S3QzLMfjmMmhWRdqiJWXwhi16uO8l6UqV sGzQ== 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=RVSwHayKkwZNJ6ezbmtU/pY9ilSR2aL/B/YQKHdJ0Hc=; b=SArvy1Ediz0AWqTDpDIymTtat9G6WmvC8emL48ePFitR7YSzJ+uS6H1Qd6qI9HGjmM UNATefzbM8E4L5kCoEKii14II7JYjgWwLA6W5+ydqIgfyCRwW9cH3dCaSfUrHGJVAEcs mJzsDJVwM0kLJGnpvfd2nph8cIMTzjzqljOWtbfgJSEqZctbnPO2v0Unvw05u5Zi/MXm BoOI/hcxpJcHpmB099nMhPaISTLJflNWR1hdwFtLJzOCxkxUlZs1JZK1+sAB7nycAyrM 8285NFmrjTZvsCJvzrqM6HbrJYtcbuU2S8uzzNNOGtCnMlU44aM1R59nxYrVlUOHLmKz 9+bw== 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 c1si7670317pfv.12.2021.04.16.04.25.01; Fri, 16 Apr 2021 04:25:14 -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 S241981AbhDPJoH (ORCPT + 99 others); Fri, 16 Apr 2021 05:44:07 -0400 Received: from foss.arm.com ([217.140.110.172]:37412 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235027AbhDPJoG (ORCPT ); Fri, 16 Apr 2021 05:44:06 -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 3AF21106F; Fri, 16 Apr 2021 02:43:42 -0700 (PDT) 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 BCC153FA35; Fri, 16 Apr 2021 02:43:40 -0700 (PDT) From: Valentin Schneider To: Rik van Riel , linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Ingo Molnar , Vincent Guittot , Dietmar Eggemann , Morten Rasmussen , Qais Yousef , Quentin Perret , Pavan Kondeti , Lingutla Chandrasekhar Subject: Re: [PATCH 2/2] sched/fair: Relax task_hot() for misfit tasks In-Reply-To: References: <20210415175846.494385-1-valentin.schneider@arm.com> <20210415175846.494385-3-valentin.schneider@arm.com> Date: Fri, 16 Apr 2021 10:43:38 +0100 Message-ID: <87tuo6lg39.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/04/21 16:39, Rik van Riel wrote: > On Thu, 2021-04-15 at 18:58 +0100, Valentin Schneider wrote: >> Consider the following topology: >> >> Long story short, preempted misfit tasks are affected by task_hot(), >> while >> currently running misfit tasks are intentionally preempted by the >> stopper >> task to migrate them over to a higher-capacity CPU. >> >> Align detach_tasks() with the active-balance logic and let it pick a >> cache-hot misfit task when the destination CPU can provide a capacity >> uplift. >> >> Signed-off-by: Valentin Schneider > > Reviewed-by: Rik van Riel > Thanks! > > This patch looks good, but... > >> @@ -7672,6 +7698,15 @@ int can_migrate_task(struct task_struct *p, >> struct lb_env *env) >> if (tsk_cache_hot == -1) >> tsk_cache_hot = task_hot(p, env); >> >> + /* >> + * On a (sane) asymmetric CPU capacity system, the increase in >> compute >> + * capacity should offset any potential performance hit caused >> by a >> + * migration. >> + */ >> + if ((env->dst_grp_type == group_has_spare) && >> + !migrate_degrades_capacity(p, env)) >> + tsk_cache_hot = 0; > > ... I'm starting to wonder if we should not rename the > tsk_cache_hot variable to something else to make this > code more readable. Probably in another patch :) > I'd tend to agree, but naming is hard. "migration_harmful" ? > -- > All Rights Reversed.