Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp575500pxa; Tue, 4 Aug 2020 12:26:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2a3w1UTEWMOjQi0lXhAEhP2WpEXph95ZMWVLg7YGYrNjwgqRWGXmg5vkI8xtMdX6wlzIm X-Received: by 2002:a17:906:c7d2:: with SMTP id dc18mr24093494ejb.135.1596569173262; Tue, 04 Aug 2020 12:26:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596569173; cv=none; d=google.com; s=arc-20160816; b=vwgYEeRU17rXYLmqTzAS6xLrrVOz76nrfjQRlnuHldC+4K4zy2BNrEZFGRkYM+fjKY YJ2wouLusdDc5z1YH9dSIYGJR3GE5WX5DUP2BnzKbw9x/S7NghSKpBaOJ4ykDqF2chQC tEzJjNXx/7gJq6dGviJwVM6K3k/lBF1TqRgcSzx5RIjj362qWlbUWUJMNkw0ld/JVAL5 Y7VvMHCUk+nxXljXPGu4/BmmtgeuvnnJcv6kGMWtanAMjaIWcp2AHi0pI7CKUXMXDBvK 6XacvGfFtP7OQcZSGzaB4VvGKZLEXrVvPZOKDGbNYlhCvXBweRW90rEbAVvHVjlv4Xnx sZfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=pzsHuz3jz2KjqjbdXSlm4QZoLu4U8KSe5A09SXjkgoM=; b=Esw8Q+xRhkmlo04lVRxSkiKzOD6VEASO/LGBE3DN5nW0XaBdk0aQAzV3j5CprOXthm MAQjZI7sRghML84YanuTppoPdJEDD0bwx1Ilk7/CI6TrrECiN6m8yklnBh8ZXU01Ywls MPvnOlQdvR9ulmxP/ZFt9H3+HN2Kb4l+tTR9ZBwpm8azSmG2lNL/47bfW6w1kgAIrao7 q5pSwQbIlDXj9jOM5jV7zyRPSSPUZPAbQ542c3EZCQEhq3HJbQlzhJzflgAhTB0ysthD jNXARibquetY1r58mc1RrOGLjwciXerdhOB3whcbAXZ2T9Q+7+J48xxUHWOF67sE9An7 HSTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=pxfZMucz; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c14si13119031edy.395.2020.08.04.12.25.50; Tue, 04 Aug 2020 12:26:13 -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=@google.com header.s=20161025 header.b=pxfZMucz; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728111AbgHDTY4 (ORCPT + 99 others); Tue, 4 Aug 2020 15:24:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726027AbgHDTYz (ORCPT ); Tue, 4 Aug 2020 15:24:55 -0400 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DFAFC06174A for ; Tue, 4 Aug 2020 12:24:55 -0700 (PDT) Received: by mail-qk1-x744.google.com with SMTP id h7so39464420qkk.7 for ; Tue, 04 Aug 2020 12:24:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pzsHuz3jz2KjqjbdXSlm4QZoLu4U8KSe5A09SXjkgoM=; b=pxfZMuczjhW/F8JFU7DtDbRoeILs3IStkDcNky/fJGelBVVhrK6RDX/i8xekFGTQLM 8aEGWH690sudIfYarn+0BOFjl6eO96prLV0OppiwlmxGDHdIenQFHdXAFK+jYYTsyg40 PuRh4BRc2RoJ5uMYVGBfIsW1RoJwmcZG3S1GNjK6uAIZUE1XXSXubWOHeNZFFHnWWNM7 REcZ5peEYawXrcYglST5UMJ82do8tM7DN8/BhW7fw1HXzqBb6u7bOGvZ7hNK4D70/hdX qu8POu2iJ04zAxE8f/TJDfjm/St+52WnUHaPeUpqhGKaTGWcMJvf35VKUVVGm9PskSal 9hew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pzsHuz3jz2KjqjbdXSlm4QZoLu4U8KSe5A09SXjkgoM=; b=C7xGAlOHgEeh2veD6lv/7V83Dlg7+XYjqAfQJZF/ksU8gTocYYNsHPrPTdMcR/BJ6M uKfyLjPntcUMFUB4y5KuGlLie1Jua31rcGQLkBi6pXb13e/2SSl6AvvELR3lw9jpg1pE TOIaiMXWjzn64CnYY1otLDoFnTCc17UemFpV/7GM5HxXsWx8GArQbukAsrIV0epvM6aw vsqiHf/OelBeu2oWBiaXXumhBAxNQ4xpCB2DRhjU/ykEyqktvo/Je594tU4BTPgkHUiY ymddd5zeYVe8v1yQkjSgjNvPECweHkexkezXvNPe/EMtObrlefrIXFi3C9LUShCwSOZD 8M3w== X-Gm-Message-State: AOAM532+abmOfc4vR2y3tyMNzrbfsmruXy/FMwz/PNqtKtGV9YTEX7pe ToTCQGQ2q++QVygdzuit2wwxT6gVv/LpeHj5f5eJjQ== X-Received: by 2002:a05:620a:15e8:: with SMTP id p8mr22024185qkm.182.1596569094262; Tue, 04 Aug 2020 12:24:54 -0700 (PDT) MIME-Version: 1.0 References: <20200804000614.4176212-1-joshdon@google.com> <20200804105619.GE2657@hirez.programming.kicks-ass.net> In-Reply-To: <20200804105619.GE2657@hirez.programming.kicks-ass.net> From: Josh Don Date: Tue, 4 Aug 2020 12:24:43 -0700 Message-ID: Subject: Re: [PATCH] sched/fair: ignore cache hotness for SMT migration To: Peter Zijlstra Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 4, 2020 at 3:56 AM wrote: > > On Mon, Aug 03, 2020 at 05:06:14PM -0700, Josh Don wrote: > > 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 | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index 2ba8f230feb9..5b203b55bcb2 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -7402,6 +7402,9 @@ static int task_hot(struct task_struct *p, struct lb_env *env) > > if (unlikely(task_has_idle_policy(p))) > > return 0; > > > > + if ((env->sd->flags & cpu_smt_flags()) == cpu_smt_flags()) > > + return 0; > > I think that wants to be: > > if (env->sd->flags & SD_SHARE_CPUCAPACITY) > Agreed > Also, perhaps stick a comment on top with the rationale for this. > > > + > > /* > > * Buddy candidates are cache hot: > > */ > > -- > > 2.28.0.163.g6104cc2f0b6-goog > >