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 A0062C433B4 for ; Thu, 15 Apr 2021 20:39:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8195B61166 for ; Thu, 15 Apr 2021 20:39:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235390AbhDOUkN (ORCPT ); Thu, 15 Apr 2021 16:40:13 -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--