Received: by 2002:a17:90a:b81:0:0:0:0 with SMTP id 1csp995299pjr; Fri, 30 Aug 2019 10:58:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqyS8nWLqMUAEKgInu4ovGc2OKoItq1XwfKjxkZYFi+3cTmdyYx3X0IxwQcc5WUDypLDMJWJ X-Received: by 2002:a17:902:9689:: with SMTP id n9mr17281490plp.3.1567187934925; Fri, 30 Aug 2019 10:58:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567187934; cv=none; d=google.com; s=arc-20160816; b=EGFqukaolQNd/c4Xm5au6/iuQyGY1a4TWC/Y2622GhKOc2kn6YwmsjKeyZi6bK0HWB mIbMa/bSoZ43BnBT2/JwAj9fbN4I/tk19MYEqh5uIs0jJK2i1gr0Jg81NVX/JY1KwMNT yf+ZT2P3k6mDbSyUW2i00lBtKI8Gyj8L4ND4A/6CrHPNl8x5cvZarUWqvrLXlixebwJ4 RdNG66016RDQKc0nSLqEMrMGArSCT3k7eUswAQNmeZiRvVaARIaavXhB0+ssHyMLZ2Nu Sj22OEnViw2sqMBYDbD6WoCLF0UsNaQE0AEPlh8eMzE1ULc1Bbh5mEGkUTJwDIRk4Hoz 93dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=WLjAP1VuRPD7T24HdOHcq2kkufJGwT1myaPkF7TK2rY=; b=cldV2vuuGi2E+9QZitrr9nWzzJydi31Uw7AQeJqpc5a8eR/pKux+IOgQo8+h3G0kl0 zWakXAdeZuiDa6rFsru7EmAFDMcVO0jFBNfVxaOvlvyfiCXKmkZuDB5rUZ8FYXc4pt+A 0eYkXpTzLTafNGJlnsQLx07OxBhYEeez2wht1W/EWvIsAm5rPng2UnDMQMpA9UUcPTp2 //wuyokzVB6pMmwnrfJMsVKEEXOlCEpSohHKz8cy77Nm8ynO6JtWIxmFal1bXTYaq3y0 NJYSs1aDe3OqQRoIpb32Z3pG3KKMihnmtCfH83s03gNezU4t4Mu5pCr9AdlrGYdhX4bd Vprg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=m0ksD2fG; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j63si4756857pgd.493.2019.08.30.10.58.40; Fri, 30 Aug 2019 10:58:54 -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=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=m0ksD2fG; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728161AbfH3R5d (ORCPT + 99 others); Fri, 30 Aug 2019 13:57:33 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:36536 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727883AbfH3R5b (ORCPT ); Fri, 30 Aug 2019 13:57:31 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x7UHt6tG088742; Fri, 30 Aug 2019 17:55:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2019-08-05; bh=WLjAP1VuRPD7T24HdOHcq2kkufJGwT1myaPkF7TK2rY=; b=m0ksD2fGgeHFBlw1FFs+XrfRIpe9gWdSiCQPiJkBT1kXliQl8ONfx00zzNhMn1+Ghja6 Qt+d4bxct+kqmwRB+q8x6ouJgvbYzbF7eikq1aWWGo3lg3OjOneCZC9UVqfQJkqPBtgI UBVYkiPuZPmOEQBIwvRwkJ7QsnMv387UmHVcjrXIh2Pv03FupOvPImmRcORPwJjq1q+l tiubmpBhH+iW00oTs4LwR2Y5hLpFdLgqr/HRSwtKQD6D/hnIklau/KLg0UqpTXDzEnVt X6a/HiMSKWNMBNIicn+Xte5pss7AER5ylZ9fQS3F5nue+VJ4bRh+wLZUaPncOmcZMy8H sQ== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 2uq8fsg22d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Aug 2019 17:55:12 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x7UHrdvt017952; Fri, 30 Aug 2019 17:54:38 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 2upxabkvtm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Aug 2019 17:54:38 +0000 Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x7UHsbvK002069; Fri, 30 Aug 2019 17:54:37 GMT Received: from smazumda-Precision-T1600.us.oracle.com (/10.132.91.113) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 30 Aug 2019 10:54:36 -0700 From: subhra mazumdar To: linux-kernel@vger.kernel.org Cc: peterz@infradead.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: [RFC PATCH 7/9] sched: search SMT before LLC domain Date: Fri, 30 Aug 2019 10:49:42 -0700 Message-Id: <20190830174944.21741-8-subhra.mazumdar@oracle.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20190830174944.21741-1-subhra.mazumdar@oracle.com> References: <20190830174944.21741-1-subhra.mazumdar@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9365 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=838 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908300174 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9365 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=899 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908300174 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; -- 2.9.3