Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2646284pxb; Mon, 19 Apr 2021 10:19:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1j5rV7QdPMqODg081HEupKxhaDHmNQDV695sLYsWQeK0Fh2OPqeR8OTpInlBHqCJKGLCH X-Received: by 2002:aa7:ca0f:: with SMTP id y15mr25338712eds.384.1618852783450; Mon, 19 Apr 2021 10:19:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618852783; cv=none; d=google.com; s=arc-20160816; b=W0Fh7tA34URk7rmW+JP3OACVS3sftkbLv5d2w/eiY4XbUwaBPvyPrTtpTfuPAmow33 BD6mIiOvbVXYxLWekxxnfKWoMOIU04jh7qxxXgRw/w36LqVJH3Iv2tfMW9CkUevv90cT CbagXTSrR2OFNttY79Ku0e2UN0SThQiSxC2rN30INpK/iT+q1JZ+fY0sdx9EmzPuLnjk VkpArxzbQ0V1vqWzlzKHSYvq7FBenImPSwj6zD8aneheHKmq+/mXV4q7wbiM3IQz2/aT xPM/qD+5M8VDQjUg0vUVsDTS33LNkP/lxLVQwDQomjOzN31RPGIuAEEg6r2mXEjaJXS0 wW+w== 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=EVa+WEoYmbN5LdtrEiDwqMWRcOz9QJXpOqcS3AMYbu8=; b=LzsTx6fkx9BBK3stfm7efOJZeegPhMdfDUoYutUaznrLe1rjGf/MQfswyDVCcde0Da 0/GEB5vnBzuOubgPGYPikTXCzOz8QBhyv7blMQ4PZO+lJEqBmi4ZbpOA/6iT7IbWTFdi csbZr0rmOfxN5isF/2N1TwSHPePQPFOW00nPJ7XNoFruDFnd3qwCSVDUe9y1y7QnXCuz HBt4hoCFRbRJnaQmX8BkSLwJ3bR96R3tqCMGV8fkvZONLPhEnQ+2QXJB5y2cbUWaD639 zM1OM90QcqINnxSGq4FRVssk08MD6uvnQ0ssFf/LZvCKJGyGsDOCDVKx5ijnHOGRy3Zb 5dJg== 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 hq8si12608069ejc.358.2021.04.19.10.19.18; Mon, 19 Apr 2021 10:19:43 -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 S238974AbhDSRSW (ORCPT + 99 others); Mon, 19 Apr 2021 13:18:22 -0400 Received: from foss.arm.com ([217.140.110.172]:47076 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232572AbhDSRSV (ORCPT ); Mon, 19 Apr 2021 13:18:21 -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 8984C1478; Mon, 19 Apr 2021 10:17:51 -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 02DB53F7D7; Mon, 19 Apr 2021 10:17:49 -0700 (PDT) From: Valentin Schneider To: Phil Auld Cc: Rik van Riel , linux-kernel@vger.kernel.org, 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> <87tuo6lg39.mognet@arm.com> Date: Mon, 19 Apr 2021 18:17:47 +0100 Message-ID: <878s5ekxc4.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/04/21 08:59, Phil Auld wrote: > On Fri, Apr 16, 2021 at 10:43:38AM +0100 Valentin Schneider wrote: >> On 15/04/21 16:39, Rik van Riel wrote: >> > On Thu, 2021-04-15 at 18:58 +0100, Valentin Schneider wrote: >> >> @@ -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" ? > > I thought Rik meant tsk_cache_hot, for which I'd suggest at least > buying a vowel and putting an 'a' in there :) > That's the one I was eyeing: s/tsk_cache_hot/migration_harmful/ or somesuch. Right now we're feeding it: o migrate_degrades_locality() o task_hot() and I'm adding another one, so that's 2/3 which don't actually care about cache hotness, but rather "does doing this migration degrade/improve $criterion?"