Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp4150453pxa; Mon, 10 Aug 2020 01:59:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5hWUYHODAfa+4AxIoslAPtCfEShu1/gK+SC0m2ZbQxBK3/kD9NbaRw9z/FARu2Zof2oGo X-Received: by 2002:a05:6402:2069:: with SMTP id bd9mr19562572edb.127.1597049949308; Mon, 10 Aug 2020 01:59:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597049949; cv=none; d=google.com; s=arc-20160816; b=DPelPX7CBe8HP2Kcq5Zgw1bGfJK1Qmo7ACKvIrS/uV7xpnJmIoJunMQAiSWq4YOZTB vNJTqY1xrnh3U94ZyzCYWw58G7C41G+EmxXvhQlPGXvgT5orzxOdTL6kbp8CoUVhg/dp 4GRXQSYtFhPrs+MiaC177qtR3glgo3a0ikDnVLOyxCBUvbvqjIUpRx/RC12QvPzqidFD wmgec/c6WXFJavE51y4+KKfJzvwGaEU5F01V5QSVbYbbiVglLtfws49hZ9PoD3Xp1L2/ 8YlAuGhDtkIf/LwBK29BXXioFer1uwZc+rAaNTJWgUsQ2LMdzNOa7nexFLt40B4vDwBP PQkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references; bh=4sFM6DRyhQl5oH3SkNx9yeQKJV6cg1C+50fhnynDDeI=; b=HPNZRSHyzqYxmZrfz8bOJ7Qi4vTwHXOek5nGiJ3jHZ8yxmSda+0HX9shpIASGOjPSh fbiGvDwzWNTbZtkHZVNOjhwRheIqNfPk+TN9gL4/7c80JhJgB/vIVD3BZYlMuRTi2Nkh JfTY0lsHgGlxWb+njBRb0Wjvt4EURcAsmnwnyflG1zK2hv9FnrlKCQJTs/E+wTcqEwCe IGGU/49fveuftgdnms3jt0sHUitI+fKxCSdyvlpZn5qUZB7CYeo65rY+/0v63ok0ifWz 4vtd+MSQCfdQAaG1BmAlD10aEmXQhb6gKW87jSdI5pFbbQ76UjMkrpTekSIwt4/DXcZ1 7z9g== 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 cn3si10385566edb.563.2020.08.10.01.58.46; Mon, 10 Aug 2020 01:59:09 -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 S1726428AbgHJIzi (ORCPT + 99 others); Mon, 10 Aug 2020 04:55:38 -0400 Received: from foss.arm.com ([217.140.110.172]:54270 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725857AbgHJIzi (ORCPT ); Mon, 10 Aug 2020 04:55:38 -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 0313A11B3; Mon, 10 Aug 2020 01:55:38 -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 882EA3F7BB; Mon, 10 Aug 2020 01:55:36 -0700 (PDT) References: <20200804105619.GE2657@hirez.programming.kicks-ass.net> <20200804193413.510651-1-joshdon@google.com> <20200810061406.GA15559@linux.vnet.ibm.com> User-agent: mu4e 0.9.17; emacs 26.3 From: Valentin Schneider To: Srikar Dronamraju Cc: Josh Don , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] sched/fair: ignore cache hotness for SMT migration In-reply-to: <20200810061406.GA15559@linux.vnet.ibm.com> Date: Mon, 10 Aug 2020 09:55:31 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/08/20 07:14, Srikar Dronamraju wrote: > * Josh Don [2020-08-04 12:34:13]: > >> SMT siblings share caches, so cache hotness should be irrelevant for >> cross-sibling migration. >> >> Proposed-by: Venkatesh Pallipadi >> Signed-off-by: Josh Don >> --- >> kernel/sched/fair.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c >> index 1a68a0536add..abdb54e2339f 100644 >> --- a/kernel/sched/fair.c >> +++ b/kernel/sched/fair.c >> @@ -7402,6 +7402,10 @@ static int task_hot(struct task_struct *p, struct lb_env *env) >> if (unlikely(task_has_idle_policy(p))) >> return 0; >> >> + /* SMT siblings share cache */ >> + if (env->sd->flags & SD_SHARE_CPUCAPACITY) >> + return 0; >> + > > If this for retaining cache hotness, should we look at > SD_SHARE_PKG_RESOURCES instead of SD_SHARE_CPUCAPACITY? > Josh's patch only targets migrating tasks between threads of the same core - as he points out, cache hotness shouldn't matter here. Using SD_SHARE_PKG_RESOURCES here would mean freely migrating tasks between any CPU of an LLC domain, which is quite likely something you do *not* want to do. >> /* >> * Buddy candidates are cache hot: >> */ >> -- >> 2.28.0.163.g6104cc2f0b6-goog >>