Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp340625pxy; Thu, 22 Apr 2021 03:27:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwILYY6dVRYhiLNiKj4wzjSAF5kG1LtrVqh6YEI5hr7wJO4mQm4usCWNDHX3G/ENuuL5JGb X-Received: by 2002:a17:902:59cd:b029:e9:a757:fa3f with SMTP id d13-20020a17090259cdb02900e9a757fa3fmr2740425plj.46.1619087233194; Thu, 22 Apr 2021 03:27:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619087233; cv=none; d=google.com; s=arc-20160816; b=SNvfvqGsPt5L8SugUuzi5yN36xByRmO3wOVi31++2f63u8EKiEgvMwY0ips4QN66zv ehuCa/ePfFbNeD4o7EJnPfxJRwVuvAeLPQUXVP9VyF5YhmVyXIgTCO4RGy88BGlxQ4lk 3SSyh3l0PgltBGIsQF9ajEq4s+0HzuNvOPS8R+6TgYk4xXWA8Vmc1q2CCpfZP6hBJKFO 2C8A7aVjUlhOM9n3btqxzLptcZT2SGSoC5ltyuLuDa7ccw2XE+GMgr+vhsqQ7G5ftjba c15T3CyzdadtNB4ewOlA76kMjqCqi13btfP722AHtTz3alJE8m5A9qdRwJpXulsAAFN9 c05g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fJ9TjVWCyOxpcyioWbiBTZ91SlMHjIjT46uJCacDjxk=; b=QdqmA+8t+7hyJIlg/6bLyi0iZLgnAbk+7KAmv7uVJ9RwJH6Hc665GSfsXdR2KYJRqx ZXrO7wUxby10/gAZbDYqTawThl5HL5QhedRD0wxRxsDbBW0ojBPaZ44dGp30Y157UNla y2LBpspLOt9qNsZLUzk7aWUY6wKmZUkTM0haEWLbMh8eZKdZMDMkxqEr9jPDLmukerP6 af1EHRFSsPBt6lyCW244WmKd2PizwH+fIxuddfZs5DU/Zk3g5iyLxXLAQRHH0IiXs/lI GO7iCiFM+ZHCWTP/9D0IXB1jkvJac2CDXuMpsMIh2sCVn82M7wJZWKjONKf/bNaM0Kpa 466w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="d5ssH/mP"; 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=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l68si3007006pga.412.2021.04.22.03.27.01; Thu, 22 Apr 2021 03:27:13 -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=@ibm.com header.s=pp1 header.b="d5ssH/mP"; 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=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235983AbhDVKZW (ORCPT + 99 others); Thu, 22 Apr 2021 06:25:22 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:48132 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235906AbhDVKZF (ORCPT ); Thu, 22 Apr 2021 06:25:05 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13MA42c1032649; Thu, 22 Apr 2021 06:24:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=fJ9TjVWCyOxpcyioWbiBTZ91SlMHjIjT46uJCacDjxk=; b=d5ssH/mPdZX6hMN3eQoitebuzUUHDBTkFQC4U7BQH7qj3PEEufwH0GFux5I9oeaCdVkZ JXx3XQUuAoS9Hm/gD5Y64jwIs0IxbIgrqdcIU/12FjcIz80ducxgbT1dhjfkVR6F+wyx HFKhONiuOhxx2b7yLe7qQ1R7Ck9Xd3GnQ0YPj+p1onceBBKqEn6xdLOhQwo8rSf09D8m C2m2PAIB0mqEhGvsMIJ17qfbnH6YjjTRjv975HtTaLf6nCsWIfyg9+9/pBwxfwHk7OYb VrV02umiAHPIqPlJpoalpZ+N0sER3TfEaU0TIiA3VGPVJnNjKxWwg0yFBt5nt7KSv9XU ng== Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 38347rnv04-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Apr 2021 06:24:18 -0400 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 13MALxXw020437; Thu, 22 Apr 2021 10:24:16 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma06ams.nl.ibm.com with ESMTP id 37yt2rtrhv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Apr 2021 10:24:15 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 13MANolZ30540132 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 Apr 2021 10:23:50 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 84224AE053; Thu, 22 Apr 2021 10:24:13 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 49D95AE055; Thu, 22 Apr 2021 10:24:10 +0000 (GMT) Received: from saptagiri.in.ibm.com (unknown [9.199.63.107]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 22 Apr 2021 10:24:10 +0000 (GMT) From: Srikar Dronamraju To: Ingo Molnar , Peter Zijlstra Cc: LKML , Mel Gorman , Rik van Riel , Srikar Dronamraju , Thomas Gleixner , Valentin Schneider , Vincent Guittot , Dietmar Eggemann , Michael Ellerman , Gautham R Shenoy , Parth Shah Subject: [PATCH 10/10] powerpc/smp: Add fallback flag to powerpc MC domain Date: Thu, 22 Apr 2021 15:53:26 +0530 Message-Id: <20210422102326.35889-11-srikar@linux.vnet.ibm.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210422102326.35889-1-srikar@linux.vnet.ibm.com> References: <20210422102326.35889-1-srikar@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Ywdy0kJRbLxX37bcS-uefQHxleg7Lo4i X-Proofpoint-ORIG-GUID: Ywdy0kJRbLxX37bcS-uefQHxleg7Lo4i X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-04-22_04:2021-04-21,2021-04-22 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 bulkscore=0 mlxscore=0 malwarescore=0 spamscore=0 adultscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 mlxlogscore=767 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104220084 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Power 10 supports MC domain. Cores within the MC domain aka hemisphere have lesser cache access latency compared to cache access latency for cores across the neighbouring MC. Last level of cache for a Power 10 is at Core (4 threads). Now that scheduler supports fallback LLC domain, mark MC domain with SD_FALLBACK_LLC flag. With this each SMT 4 core forms a pair (as fallback LLC) with another SMT 4 core within the MC domain. Cc: LKML Cc: Michael Ellerman Cc: Gautham R Shenoy Cc: Parth Shah Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Valentin Schneider Cc: Dietmar Eggemann Cc: Mel Gorman Cc: Vincent Guittot Cc: Rik van Riel Signed-off-by: Srikar Dronamraju --- arch/powerpc/kernel/smp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 5a4d59a1070d..bc6386055cbe 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -950,6 +950,11 @@ static int powerpc_shared_cache_flags(void) return SD_SHARE_PKG_RESOURCES; } +static int powerpc_mc_flags(void) +{ + return SD_FALLBACK_LLC; +} + /* * We can't just pass cpu_l2_cache_mask() directly because * returns a non-const pointer and the compiler barfs on that. @@ -986,7 +991,7 @@ static struct sched_domain_topology_level powerpc_topology[] = { { cpu_smt_mask, powerpc_smt_flags, SD_INIT_NAME(SMT) }, #endif { shared_cache_mask, powerpc_shared_cache_flags, SD_INIT_NAME(CACHE) }, - { cpu_mc_mask, SD_INIT_NAME(MC) }, + { cpu_mc_mask, powerpc_mc_flags, SD_INIT_NAME(MC) }, { cpu_cpu_mask, SD_INIT_NAME(DIE) }, { NULL, }, }; -- 2.18.2