Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp699982ybe; Thu, 5 Sep 2019 04:42:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxoSDOLu40uzyLbfMxXRwFEyeyr/V9opNVf0n9TGoSE9Oztn/SWrs2qAayXJUh3cUb2f9hJ X-Received: by 2002:a65:4546:: with SMTP id x6mr2702946pgr.266.1567683737110; Thu, 05 Sep 2019 04:42:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567683737; cv=none; d=google.com; s=arc-20160816; b=qYL+DSW+KaFqas37q+QNzFwujlO0cQFgRQFs/HTPrrczySglahgsSq7c6n/c65011g cgNXYEC4Gz/snaTmm5yW835AgoUBcWsGpQUWyvnQQqC55LTpV5uTpn/DKf8dNUYa53Ss dv8nSsa1gargm0PpHxj+Rvh2qd5l6CG+qDfKCqSkWL5MO9KofkNhHJNp8rBc1PEJz8Cy CMlRqKa4T2Gtr/TCvoBhqhNNNpHuLEwfrnq9nAT269O24RIFWugQfp5jez2pWmGxUDYo j/KGKfYH6PINyrRE9WubWFHN2BQXLk1/UUjua8eWWBibA0PXuRhfgOCAjCoAI76YcUa1 /jmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9RD+YDd+bL9dLE8aDPXeDMgQEDl+xz6cGixfqwcR1Rw=; b=DRkJKschfGE0c/ClzhDyI13aa5dE3HNDXSpNmzvwjuJfq1DOcA/usR9eQnNOL0q01H 9tA/RIAmEptwiNtkKQzhCzERatC3oiF0x6KK76zAA0GBDcti1pPCU+mvul2vSJL5eyEg iiNhwC//Y4oXgltQ/eNV5BrKaab9zLHQ5Ft4VBJYHHd/8ael09EKBmQ6n2IjiSkmGowj ypX2g1OQRcxG6r+AfX9R3wYWvZAgjkDILG0wEhSSRtH/TKAB7c905U5clg7r3/LhABtG OIM/wBcK9SvJJw+vWQslpdIHHylpAh4oVod5I1jdgH1TpUPPj6UaSO6rNXvSITuWEqmT 8d/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=HcCxby0x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e10si1878195pjw.30.2019.09.05.04.42.01; Thu, 05 Sep 2019 04:42:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=HcCxby0x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387460AbfIEJbg (ORCPT + 99 others); Thu, 5 Sep 2019 05:31:36 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46110 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731306AbfIEJbg (ORCPT ); Thu, 5 Sep 2019 05:31:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9RD+YDd+bL9dLE8aDPXeDMgQEDl+xz6cGixfqwcR1Rw=; b=HcCxby0xFotVIfK2DaQ8o2pYU 0tWCJ+L+DSDMHFkuNYxZOnExkCtDwDp95W7BxW95bo4qnOFfXxeGEZBLFp9fXgQQ9fHiWs5c23H+u kPjtoeJ5yDaq5o4odJszTQ7iLurIWQPuM5YdjvWbZO8V8DQba7NYVIzZwmXBWmYLPuTAjJugiSPFv mlahJqN6I8Oa0Dia48ONZ/0CZGJn+TR7TJcxxNQP3lvrLbRBAr2bASDQv5ruLvKuT1QE//anFkChN EB4qYQqJfYMyv89CRsK9Sv14WpMYA9u7LrZHiVSgXqnC1NlOyJ2ms7LiloK+JwqvqlpKfZX3dALrb /sGRM0Kkw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1i5o6z-0002UZ-PM; Thu, 05 Sep 2019 09:31:29 +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 040A0305E47; Thu, 5 Sep 2019 11:30:50 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id E064820EFA5D9; Thu, 5 Sep 2019 11:31:27 +0200 (CEST) Date: Thu, 5 Sep 2019 11:31:27 +0200 From: Peter Zijlstra To: subhra mazumdar Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, tglx@linutronix.de, steven.sistare@oracle.com, dhaval.giani@oracle.com, daniel.lezcano@linaro.org, vincent.guittot@linaro.org, viresh.kumar@linaro.org, tim.c.chen@linux.intel.com, mgorman@techsingularity.net, parth@linux.ibm.com, patrick.bellasi@arm.com Subject: Re: [RFC PATCH 7/9] sched: search SMT before LLC domain Message-ID: <20190905093127.GI2349@hirez.programming.kicks-ass.net> References: <20190830174944.21741-1-subhra.mazumdar@oracle.com> <20190830174944.21741-8-subhra.mazumdar@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190830174944.21741-8-subhra.mazumdar@oracle.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 30, 2019 at 10:49:42AM -0700, subhra mazumdar wrote: > Search SMT siblings before all CPUs in LLC domain for idle CPU. This helps > in L1 cache locality. > --- > kernel/sched/fair.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 8856503..94dd4a32 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -6274,11 +6274,11 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target) > return i; > } > > - i = select_idle_cpu(p, sd, target); > + i = select_idle_smt(p, target); > if ((unsigned)i < nr_cpumask_bits) > return i; > > - i = select_idle_smt(p, target); > + i = select_idle_cpu(p, sd, target); > if ((unsigned)i < nr_cpumask_bits) > return i; > But it is absolutely conceptually wrong. An idle core is a much better target than an idle sibling.