Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2828435pxb; Mon, 19 Apr 2021 15:19:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJys0h8pb3yB36+gMyGGvmrlJktHN5Ruf1tEXy/nH7oBJ05wk8QUbMMnPCjVuq5fgwX8YAQ+ X-Received: by 2002:aa7:9f08:0:b029:25b:70c0:a31b with SMTP id g8-20020aa79f080000b029025b70c0a31bmr13896090pfr.61.1618870785493; Mon, 19 Apr 2021 15:19:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618870785; cv=none; d=google.com; s=arc-20160816; b=DD7zS0gmGbYS0SRci+MvhVGSCop7WdzkefIqv8axYnrlXWPusRyZjZjlcDM+vddkkR OCfPrNpGb6ugj5nYIij4QEwEHkORqfnudPQwbVfveKqUt18UNXhBRx7QA/n6/mKFGfOs WRVXHW/n7opC0qEZTvIk/KSW+wi1LzgdGz+ElL/vjJlUjG3xvuFBu8WeAqq0/TIIDLsW Lbpx94g4J0XwYS9VvpFyT9EhznaE+3SV+bAQagkzVX3TEFiCkWsw3bf80F9cIW2Fhyhp jJ0q4tjIhccCc7wjeziUnD5chU1yG1ZVZWoUsoBvvPj6nx6pzjez7Q1juZI/vHUncS5O a16g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qMK5LdGW1tcHxkX+kXlO6KoaSLfAhc06ukgjVccttxE=; b=kqYWfG1mt9Sow/y8ktBUi8y6flIQBcGssO9dd4mKzhcBw4zUuoDXPS5C6WuU7vXhdx Le1SJABWxvncFsycTvGveBU/ZJrz66huAKbzCDHBZm9+4wtGEzdHsw5OTmrQOR9JEAWR vnJWG4KG+/2s0yMReUaZqvUptGrAHFklBDiIkgpNKBX9E2bZHug8gO6v9axba4vauWnn AIK6q5UDC3Jzq3PLLHYYVLhQRr89IkEpWVj5/NC4Xvz5dbsV43M3ZVl8Mz82f2vYb0uK mKNGyM7ZSc+4dayOuKMnkyu203JjWL9j8oq6cPHOQg0yG4dAsYdh/qaY2RjdMdWOAWxu rm3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="VJceume/"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s139si19405236pfc.9.2021.04.19.15.19.33; Mon, 19 Apr 2021 15:19:45 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="VJceume/"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233007AbhDSUYa (ORCPT + 99 others); Mon, 19 Apr 2021 16:24:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:37135 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231294AbhDSUY2 (ORCPT ); Mon, 19 Apr 2021 16:24:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618863838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qMK5LdGW1tcHxkX+kXlO6KoaSLfAhc06ukgjVccttxE=; b=VJceume/Gn75PSi39Z4vr3KIOCU/KEjx0I+tbzjyGnhCyQnMEK1QBMqOJjG1rkh3kna1v1 S4Ulcnr/tgvWD02IQyTsnS6gGQ9VBkWgB6NOl9FlXtv1Um/XFURTqw7LKYVvGqH7GnjEVk XJB3SnYcZxKntc2GXRBwec+XWeCQMog= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-391-QRMdvGKMNbqdW7a-UmQKQw-1; Mon, 19 Apr 2021 16:23:53 -0400 X-MC-Unique: QRMdvGKMNbqdW7a-UmQKQw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 86535801814; Mon, 19 Apr 2021 20:23:51 +0000 (UTC) Received: from lorien.usersys.redhat.com (unknown [10.22.8.218]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2C0DC5C1CF; Mon, 19 Apr 2021 20:23:50 +0000 (UTC) Date: Mon, 19 Apr 2021 16:23:48 -0400 From: Phil Auld To: Valentin Schneider 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 Message-ID: References: <20210415175846.494385-1-valentin.schneider@arm.com> <20210415175846.494385-3-valentin.schneider@arm.com> <87tuo6lg39.mognet@arm.com> <878s5ekxc4.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878s5ekxc4.mognet@arm.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 19, 2021 at 06:17:47PM +0100 Valentin Schneider wrote: > 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: > Fair enough, my bad, the migration part immediately drew me to migrate_degrades_capacity(). > 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?" > prefer_no_migrate? Cheers, Phil --