Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1086983pxb; Thu, 15 Apr 2021 13:45:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz35xUnA254pjwGAO+8gkNp59XO/DWH+eCEKmkOazixC5pkyHM0nMiZt5jYxb24Xktkd72x X-Received: by 2002:a17:907:e87:: with SMTP id ho7mr5326129ejc.2.1618519500990; Thu, 15 Apr 2021 13:45:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618519500; cv=none; d=google.com; s=arc-20160816; b=jvEvCqHhpWosWH4ZcGJTrDsdLuuKdIFJg7gzGLQAq2Ao1r3OzVuwrexQxkZ3giJmiI oUdSsFSKGwsXneh1vHsFKN01gno2O/Bo88nNcQiiq7BFcbhR4A3oXL4x7tqMmrpgUAdA vMf/o8qEoOiO0ucOfJlrYRaajLYme8+BKLxIh8SNtZAgAF5aONfaGH8hEBev/Of2FVX9 8BlZ02rF6ju+cJpKdPKI0KiGDkvrtoMlovXCDYgNU1Puk3UX2x18tW+ZCoa3ZTwt6NX0 7iF4u2jW1Z4AVa/QqN9ZkIS+NlRTQOxbolFvcAHbX7oVV7OKCZFs4PqHAYsqoTYDNxHo 3UeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=TFsG8MAtdMJyQAqR6TOu6cPRYuaQgREAMJUoI2d7nXA=; b=ec5mCIizgOS1s9tPMbODnapXdxwOlg8qQePyL5mxTk9ecXdJXlldbt99HBAlJ2QsN2 GH1uyCxJqBiVCEDXDfvscWpC6N3o/8lwUDslouRYD38FcbbPsEMpNo7Sfl+Mu1RLF8e6 u4yNiRhcu/7ZplTgOCPI1OGBo2PLhDwBPF5bUaXxZxdt4g+t2qzJPiEopgMKpn449mAC 7DScuIgsq/aeGqP9c4igM5K06r8ge9jm5AyHdj6XglcYgBn4QhrhcX7nt0hayxN69aDX EB4GI30RANdmpZjZt5SPEnvdqVZbm4k2e9CLEkKaObEVHlPr801ZhDyp6h57baSww5Uj kusA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id do13si2869872ejc.87.2021.04.15.13.44.38; Thu, 15 Apr 2021 13:45:00 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235052AbhDOUkM (ORCPT + 99 others); Thu, 15 Apr 2021 16:40:12 -0400 Received: from shelob.surriel.com ([96.67.55.147]:34902 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234536AbhDOUkM (ORCPT ); Thu, 15 Apr 2021 16:40:12 -0400 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lX8m8-0001rQ-My; Thu, 15 Apr 2021 16:39:44 -0400 Message-ID: Subject: Re: [PATCH 2/2] sched/fair: Relax task_hot() for misfit tasks From: Rik van Riel To: Valentin Schneider , linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Ingo Molnar , Vincent Guittot , Dietmar Eggemann , Morten Rasmussen , Qais Yousef , Quentin Perret , Pavan Kondeti , Lingutla Chandrasekhar Date: Thu, 15 Apr 2021 16:39:44 -0400 In-Reply-To: <20210415175846.494385-3-valentin.schneider@arm.com> References: <20210415175846.494385-1-valentin.schneider@arm.com> <20210415175846.494385-3-valentin.schneider@arm.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-TXy3XvJZvO43nCmvBjz0" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Sender: riel@shelob.surriel.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-TXy3XvJZvO43nCmvBjz0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2021-04-15 at 18:58 +0100, Valentin Schneider wrote: > Consider the following topology: >=20 > 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. >=20 > 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. >=20 > Signed-off-by: Valentin Schneider Reviewed-by: Rik van Riel 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 =3D=3D -1) > tsk_cache_hot =3D task_hot(p, env); > =20 > + /* > + * 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 =3D=3D group_has_spare) && > + !migrate_degrades_capacity(p, env)) > + tsk_cache_hot =3D 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 :) --=20 All Rights Reversed. --=-TXy3XvJZvO43nCmvBjz0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAmB4pJAACgkQznnekoTE 3oNZBQgAiarBNquYuLTpU8dvB0Q9jSo4pszYmC09h7UUCB5m9GWLbvBSxG1VvCF1 dWGxCwoj3tkjmlbmGjxTwQUh9Q2PHiIFC0gJu8GBpyj6bRk/ICakO3U2+WjD3lNf HbTrkb6FH8DJ52QhiyxzOiMkcuMkTtrCCD98EdqUwXxba6ZAxNiMsnQ5+7xYz+Pe uGqfAjuIGloMvKbejE4myMg3dfQvOSHovPUC0lsLJnYbEereFA2mt3+JwQ8IXW47 gDmYwfhspr7eslvTIyZiQfqkY2GBOgyDlez5a9yD8EBJnzYsrj2cuPhbgSfw5oY2 DOWIyz510QNL3NiBSWEwm8yrLGai7g== =G9Ps -----END PGP SIGNATURE----- --=-TXy3XvJZvO43nCmvBjz0--