Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2458646pxa; Mon, 3 Aug 2020 17:08:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8WKRsMyMJkl4pETDHLeQf1pK+3PAdpdPPSfkrhVPEWOXzsNkuFNkO/kGDb6eqWoqY5vFN X-Received: by 2002:a17:906:1392:: with SMTP id f18mr18463915ejc.521.1596499690942; Mon, 03 Aug 2020 17:08:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596499690; cv=none; d=google.com; s=arc-20160816; b=qYBjqwyhfvEX+2chjf+p0OFMT4sEVMOpYhMRK27ItmiDJ8dp2MeaVTh2H304mrN+Oy Sr/ao6tpZvhnNAMJ1nn3ZXDeGBCoiJ8Fju/Za032GuTKsEaBk33tB9u/CbU8e2/djWJc ScYVe3VZEcqvyEbn5svrqU3+a9CBsphnoAF1MRKR2zRn12IUUIKNgHrHnXgpa+KvszrZ R52srQEu1xirxwdfN17beTlRXcq3orz9sR+qdo4kJkrfngO94HfHacE1raaJjRJWhWyZ Jp/Q66O0MBK59iDKQq6O8eV8B30g/GFQpc+8PqC31fhpe0wsLO5kwCNqcQABlijKUD4B 4BXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:mime-version :message-id:date:dkim-signature; bh=16cxH9SNyU+dYbQ8O4g4KQ5RGoppj2BxdNS3QniE0qg=; b=qkJc8QRNVO+upnXbI+22LmgqfzH0y7vfn14qntwCn+3aM+Vr6yyOdU6U1TauX2UJWw EaXEHH73WZgFBRvQgcsHepI1XIMcXEHsS2wP57e8EcXztEvnBbvcNokdwfp1uAW+V153 lpZV1DHY5yNlPUdSnGNYQ8AP/obeQ8Xc+E87wwVXzIp2NLCRhMsbZKAm01CSYgH9rL+t ISPKDQJO89Ne0ZjyV7VnMFypcOLC3lNOFvLny5J0AIz6HlI51E8lQ4fEGC8Zxp4IXWpM r9IKhpVTPVMcatt3nRpMyEq8woUrB5JwkNvKXRdr4h4vP90cKVMedOWJv6F3soy3ORnk MSDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=XcZ8NEau; 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 z7si11289956edq.250.2020.08.03.17.07.47; Mon, 03 Aug 2020 17:08:10 -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=XcZ8NEau; 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 S1729175AbgHDAGR (ORCPT + 99 others); Mon, 3 Aug 2020 20:06:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728010AbgHDAGQ (ORCPT ); Mon, 3 Aug 2020 20:06:16 -0400 Received: from mail-pl1-x64a.google.com (mail-pl1-x64a.google.com [IPv6:2607:f8b0:4864:20::64a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA37CC06174A for ; Mon, 3 Aug 2020 17:06:16 -0700 (PDT) Received: by mail-pl1-x64a.google.com with SMTP id p6so28721204plo.8 for ; Mon, 03 Aug 2020 17:06:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=16cxH9SNyU+dYbQ8O4g4KQ5RGoppj2BxdNS3QniE0qg=; b=XcZ8NEauPhMXWvdr1SeYjUxiwyns2TOKcv2o07F9BB6dn4sJHRhG0Nkf003ag17XBe +d72y57K+l29K4QOEipOu9Krr9oSpybIgsyi5uyh75CqFKY5G1reOAvziG/SUOz0VV+A jqlF6CLuPlcyv8ZyxpZpx1WyPfa+2Lzw5yISwBS7b1XhF+iYWvrEqcXRzJaSSdOU8nZA pbxjEzc61zdsMzQ0l+ebomOlLDWOKf0/0bl/KwABaMxxeDBWuD+skO0rWV80QxEmvZTz JzUfpchtGJ5Wl17gZdbMblwO7nqahJ08uanyTwEKHgwdtdbaynD8+gz6M5SkshmZZhdH 7YOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=16cxH9SNyU+dYbQ8O4g4KQ5RGoppj2BxdNS3QniE0qg=; b=KdFQrM3If1ethJYJCRwbNi/h4HEGMftBLiq35gPy0EroUwyz0ZmOrVyE5d6acbej9m yZsMVVT5+WkuG3tc3tpv8hcg5vZImbtoAMO/CUEIo2aAXfvtvEjIMiMEdbo55ojkEzG3 tUszCTR6DBOiuKJCxeOWkihdBvqjSvu8jiY6Fwr7/h3sJIBdyGpub1eIwYs67rsBJFEJ 4pcae1vktGzLMejYl/KvEHV2pTjUx5u8lTIyUg4JoPSfmHxIUhRHxXqaEJygs21TqvtI 2Wpu+IFF0fWNNGKw3cwx8e9GyMwMhfDcTptdZk8w7OsKghdTh25QjpRYrMTAGe73X1Co oAjQ== X-Gm-Message-State: AOAM532STVqnap2y8L/3z4Dee5Ei3/ywWoiOtmq0bC9Ktmk5i+wao8q7 ha/vMZqYkffBLk5KfltlFRIQfl/dMXTK X-Received: by 2002:a65:6710:: with SMTP id u16mr16622183pgf.45.1596499576252; Mon, 03 Aug 2020 17:06:16 -0700 (PDT) Date: Mon, 3 Aug 2020 17:06:14 -0700 Message-Id: <20200804000614.4176212-1-joshdon@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.28.0.163.g6104cc2f0b6-goog Subject: [PATCH] sched/fair: ignore cache hotness for SMT migration From: Josh Don To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot Cc: Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , linux-kernel@vger.kernel.org, Josh Don 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 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; + /* * Buddy candidates are cache hot: */ -- 2.28.0.163.g6104cc2f0b6-goog