Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp580723pxa; Tue, 4 Aug 2020 12:34:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxbA00TA9Z8MKsaFztA5idTBGP039slmP7IDUT+kXy23eLhdk+X55CCv1zoPa5KkHXkr4a X-Received: by 2002:a17:906:5253:: with SMTP id y19mr20515518ejm.226.1596569687341; Tue, 04 Aug 2020 12:34:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596569687; cv=none; d=google.com; s=arc-20160816; b=t8ZOVuCAZ6638vQgTTr03KgPK4muiLWbV4zqJfJLAGN5zgfs2jQKOPQhVYQMnkmAbS T76a17Fs5m0IxVlAOaEsMJqoHiXsgYgDuoRjjj6Y4v14mUeeRHKQr0U95dlFJTCDKMAL AjYA0q6SE9gAMpKyUVpvP1bzhuE7RM+t7w0aVc/0IkoX03L0W9F3eaecJQ+J2PNBgiNq aFoYGEGRtpCGrcuMjE3XGnVQS2MGm/B+41wH2ifd5CmazAbDQToYxNxrqtC1P9z/L26d W131dFt9Zfkwzuy7XRtsjFybK8d7RwDCKtEw2vNQ4VQ6VtIEdBCbibu617vZQ93KkPm6 iEBw== 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:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=xWqorcV6jScQp1fTMrirlsQiv+GO5jT/AZFaZd6qZmg=; b=lGHfkkjlLFulPjFvkU0p3dOHx0QgjuByql0EBmj5TqJda8K3AMdjwWY1Ranr4KsHlS Xoe00vLr2ksrUd3DfZ8bCUhqgW2U2XCbq2eK756lxv9pxe4ctS/M/jPavH1DAKt9rYjt 6nm7bDQAfxaTPIQUpRXEAgRZugjHBoAEgY8NPcfxbRCQWPEU/NT1WrF5SmCRlhjA0Ye7 t5hjjEreWe2vfr5uca9hBOwlgoPa3Gsu7TKGMuizoDihG2fUQ7C9AKNTqVGckEHkyCDZ 1221u7XDlxw58PBvz/be00ZmAwtamASKWfeS5PLjCDCKEx5ULQXnRg7JPjxMmHuFRDOP +DeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=cz0abD2C; 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 a5si10493942ejt.549.2020.08.04.12.34.24; Tue, 04 Aug 2020 12:34:47 -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=cz0abD2C; 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 S1727837AbgHDTeT (ORCPT + 99 others); Tue, 4 Aug 2020 15:34:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727064AbgHDTeQ (ORCPT ); Tue, 4 Aug 2020 15:34:16 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8892C06174A for ; Tue, 4 Aug 2020 12:34:15 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id e196so49188712ybh.6 for ; Tue, 04 Aug 2020 12:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=xWqorcV6jScQp1fTMrirlsQiv+GO5jT/AZFaZd6qZmg=; b=cz0abD2CuErsP1cPYzQqrjOvfdUUcsWYndcB9cK0MO78kPFUsR208ibCtkDzzDvVzG IffR12hbOmz5jglFa7rCfvYbAQbG5GU83g4xno7w3fuj2Iml8RVxWcOVFrPYmKJyFpOO TdI910ML+3sP2DuuMEvxdBvhKFaEhz9OgsAjmzW28WKCy7OBuM8fgXZgxxu1cd6URb3O gveWMduPBbRUa9sqNeSy6XqvGVIEvDdlEY7WO5Bn2K5cy2KnFy5Upo/cLUPcf2ZuM7m0 l1ClUb4WPhyMq7dlJ+TPpG+coxH3jS6fBsgp2qJR6mHWb1YhdJUKPhRkVGRxwZBa/SGp qtcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=xWqorcV6jScQp1fTMrirlsQiv+GO5jT/AZFaZd6qZmg=; b=uaerCQYJfpgIser2GOlpN+dXGcjI4WYjnLt0zjMsJX+8UPsePlUJkK8zQrRDr86zmh tzrZSLggvfzNJ941fOYBGyNKtaqlPJr23vzfWEhViiPiHa0i1g7twgtp3bZvwrNW1MWv /nsaS6doxdQH8vK61+IguhDX4Yp6Lm8L24ZFNfjsJd7+z0dIbdWTJkdMWm97VedTh3Gr yUEWx+KnOMmtrGScrF1B3UBkdhxoOSRW+vdFpvaeBPWmXeDTYF+gwsqbd+8T0PcLYFwk xKlItiPtl3x7JGgN9YsutfvwvOyVE7bSdWn4LDVJX9wi9kEj+Eh0vYUeRpkCHHUkvNFC kzFQ== X-Gm-Message-State: AOAM532GOY6WXRQHm2GEgNhduqaRO25U122xsGcplNseGwylTQ4u6eN5 Yh8Fhf9v5jLsyyFlzATSkN06irbSkTbL X-Received: by 2002:a25:c7cd:: with SMTP id w196mr33418875ybe.351.1596569654967; Tue, 04 Aug 2020 12:34:14 -0700 (PDT) Date: Tue, 4 Aug 2020 12:34:13 -0700 In-Reply-To: <20200804105619.GE2657@hirez.programming.kicks-ass.net> Message-Id: <20200804193413.510651-1-joshdon@google.com> Mime-Version: 1.0 References: <20200804105619.GE2657@hirez.programming.kicks-ass.net> X-Mailer: git-send-email 2.28.0.163.g6104cc2f0b6-goog Subject: [PATCH v2] 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 | 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; + /* * Buddy candidates are cache hot: */ -- 2.28.0.163.g6104cc2f0b6-goog