Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp218429pxa; Tue, 4 Aug 2020 03:59:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz23+XNe4CDcl9oj7g74g8PFAuIlZAuSe10mqRRmTeb7gLUtwExfKq9PhQ02MRoP6Eae3hn X-Received: by 2002:aa7:d291:: with SMTP id w17mr2417153edq.257.1596538778844; Tue, 04 Aug 2020 03:59:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596538778; cv=none; d=google.com; s=arc-20160816; b=LUTy7Wi/cM91vL9RBSl7Z4FRv9BvkP7NTu5iD6bnasgJ7YYg2fwIAKW+PhVJOSSaad +ZvnPhnfAQiViaKRhWOEzjhDkwy8hhuKuGwm3u7Gf/1FLVnT1hE3UzvmYRt+rYTP3yCH hFLryJeG8oW1LcEk9cTDMVpiUCzIgexUKmaxvrFcAa00fJi6i4tCvCY2fwGf0/K7m6wX jBYmzrN/CkzBzBNg0TNLNuPAo1T4ohe5Lafwqgb9GZumTudjSwo7ncVed0rHCLsJIh9U U3sIPUMK3bm6zim+fOvWxFYDGOWQZvQw4HDKzA90jFljc+Ke4+VjfnAFJQw1bdJ6fPng Y9Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=SL2IzDndId3GWn6/2W3OPatuM239OcLjh5vb98ipAS4=; b=SiPJdPN8RGms0Xvf29PLzuF9mEo4Xl43eFib84fU8lF83IkEY4wqIqoAwGeRvXXspa BbwSxKtsjIG+KGdVH1fFvnTCtoVkEGhK751ssvc4hKj4P+EAQqXNK+TT3WL+g833y55a fyBRerwhMfFwaT1V0lQbnu8y46c1T0XCMno6uemRg4uoQTw5zXerDytgSqcFAahjH5+z 6+77i/Brb9lhaZLO7XReLykKlIyFIIHbUmKw3EJ2qJWJBGNRDCLIy2eXyRmS/dvTxhaF aaRukprk1yz8vTnbwOquGL94BxvCjU8OWRLk9yQZ4743OwgxUDfevfnP0nwbskpx6FRC GjOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=B3yTcRUM; 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 ba17si11685665edb.3.2020.08.04.03.59.16; Tue, 04 Aug 2020 03:59:38 -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=fail header.i=@infradead.org header.s=casper.20170209 header.b=B3yTcRUM; 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 S1729924AbgHDK4c (ORCPT + 99 others); Tue, 4 Aug 2020 06:56:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729549AbgHDK4b (ORCPT ); Tue, 4 Aug 2020 06:56:31 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8365EC06174A for ; Tue, 4 Aug 2020 03:56:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=SL2IzDndId3GWn6/2W3OPatuM239OcLjh5vb98ipAS4=; b=B3yTcRUMHzFbnMJKuxvzYXLwWw YOW4lY0F2jJA5oJhatfzgkhxRqCZatc6osKix/HkFHg49DZHs5pSg1DyY//iXqUP22n9VOrWzPRBj WLOFOPrXMmBIOzYNanOW4RqOwYVVx2EztSzo/iMP8eRZJlcmUnMk4QVA3EGmEfO1LGJFDOvpwH5DU Vqb0wVwLZ5zGWqau070pFFM/77tL4/hh3+EOW6bHNsiU7oM/xBXJTFZxhfroy9N7AI/WdcEn5Nz8X mm8g5y4qVTnOtooY03pzrP2INnYpwUvkAsEdBpizsUijJuilILGLRng5FH8CO0hCZn2S08nTsv03N YrrF6a/w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2ucF-0003NW-Td; Tue, 04 Aug 2020 10:56:20 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 3C79F3010D2; Tue, 4 Aug 2020 12:56:19 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1BA222B94E74D; Tue, 4 Aug 2020 12:56:19 +0200 (CEST) Date: Tue, 4 Aug 2020 12:56:19 +0200 From: peterz@infradead.org To: Josh Don Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , linux-kernel@vger.kernel.org Subject: Re: [PATCH] sched/fair: ignore cache hotness for SMT migration Message-ID: <20200804105619.GE2657@hirez.programming.kicks-ass.net> References: <20200804000614.4176212-1-joshdon@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200804000614.4176212-1-joshdon@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) Also, perhaps stick a comment on top with the rationale for this. > + > /* > * Buddy candidates are cache hot: > */ > -- > 2.28.0.163.g6104cc2f0b6-goog >