Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp286839ybh; Wed, 22 Jul 2020 00:08:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhOnGo7ctX9JxxeDrJ7MQjTOLJr1fOiKnp1vyZDRId4yYmASXZ9jDn874LRCDPJYeUJ0gX X-Received: by 2002:a17:906:35cd:: with SMTP id p13mr28517244ejb.172.1595401689510; Wed, 22 Jul 2020 00:08:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595401689; cv=none; d=google.com; s=arc-20160816; b=mafoLX0vxYBegX2vwwLDS+eIn26CsoIjVKStHVPojAFSjfJgqCc1vyimtYWAlT5az7 esNhfx+BbKv+qKJmpCuaTQvQ0lTnNGgRi6uP8DbzDz8Byyf4AdGPz2T4jIm8HNBZzIa6 BIoGD2t0+Fnd0CLFaKweAgtCdMR0Sphq4kTJJWvwhdmERTw4wom/PxuyRPKnS525N3g1 iUTcPWtW1BQPkQ87rH4Encrf92S8wUmtED1X01LWmaL3IC7lZbG7E5N82vgpXcXOGXyF Qlh/wnsX/xtubhoByo6MRFiV3hgugOr/EHfmfr3f7/pytSYzx11mcoXI2Z5gl7oiO5vr waQw== 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:reply-to:message-id :subject:cc:to:from:date; bh=LLm0SNGA5ABfZsHbMIJtNm55TN3IGICLQJ+7aE2PNz8=; b=Vk1F0c+W5cdh8Mk3oyNiSTu4idLRKEKXDPeLMGBRZaYw9yKtiS/AW02POAWsXeAdFu p3E9OBTb9QqxIgQUbv4NTUILEQvK1+eKkYSLtPbSZ2UQwmHvOhpKWRxcxLVoxZO1KO9x OnzctjsaCI6FdtpQQFlcP0dXf4sdzV5rrMxlHhVrmBR3C987/TELDAp4pOTNjK5O5QiT Qgx4Nr4CgMDPgUKofwsY/j+iTNya5WMMP34XA7bSWc/ec7UYaumoP7LJeW2pLZiiP5Zf ITt43XWehsn/VeIs1O3ScaLDi5U9XmSo9LS03Rjx2gpwfbbw9pqqQ9C0fVfz7gDf0q+A oJWQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 gz11si13667768ejb.409.2020.07.22.00.07.46; Wed, 22 Jul 2020 00:08:09 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730348AbgGVHEx (ORCPT + 99 others); Wed, 22 Jul 2020 03:04:53 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:5924 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727096AbgGVHEx (ORCPT ); Wed, 22 Jul 2020 03:04:53 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06M72uYF063679; Wed, 22 Jul 2020 03:04:44 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 32ecpa5qf9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Jul 2020 03:04:44 -0400 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06M74dSS070181; Wed, 22 Jul 2020 03:04:44 -0400 Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com with ESMTP id 32ecpa5qeb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Jul 2020 03:04:44 -0400 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06M6xZTf010110; Wed, 22 Jul 2020 07:04:42 GMT Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by ppma01wdc.us.ibm.com with ESMTP id 32brq91s8q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Jul 2020 07:04:42 +0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06M74fvG34865562 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Jul 2020 07:04:41 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 50146112063; Wed, 22 Jul 2020 07:04:41 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DC585112064; Wed, 22 Jul 2020 07:04:40 +0000 (GMT) Received: from sofia.ibm.com (unknown [9.85.82.72]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 22 Jul 2020 07:04:40 +0000 (GMT) Received: by sofia.ibm.com (Postfix, from userid 1000) id 43C2B2E340E; Wed, 22 Jul 2020 12:34:36 +0530 (IST) Date: Wed, 22 Jul 2020 12:34:36 +0530 From: Gautham R Shenoy To: Srikar Dronamraju Cc: Michael Ellerman , linuxppc-dev , LKML , Ingo Molnar , Peter Zijlstra , Valentin Schneider , Nick Piggin , Oliver OHalloran , Nathan Lynch , Michael Neuling , Anton Blanchard , Gautham R Shenoy , Vaidyanathan Srinivasan , Jordan Niethe Subject: Re: [PATCH v2 09/10] Powerpc/smp: Create coregroup domain Message-ID: <20200722070436.GF31038@in.ibm.com> Reply-To: ego@linux.vnet.ibm.com References: <20200721113814.32284-1-srikar@linux.vnet.ibm.com> <20200721113814.32284-10-srikar@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200721113814.32284-10-srikar@linux.vnet.ibm.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-22_03:2020-07-22,2020-07-22 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 impostorscore=0 clxscore=1015 suspectscore=0 phishscore=0 malwarescore=0 priorityscore=1501 adultscore=0 mlxlogscore=999 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007220048 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Srikar, On Tue, Jul 21, 2020 at 05:08:13PM +0530, Srikar Dronamraju wrote: > Add percpu coregroup maps and masks to create coregroup domain. > If a coregroup doesn't exist, the coregroup domain will be degenerated > in favour of SMT/CACHE domain. > > Cc: linuxppc-dev > Cc: LKML > Cc: Michael Ellerman > Cc: Ingo Molnar > Cc: Peter Zijlstra > Cc: Valentin Schneider > Cc: Nick Piggin > Cc: Oliver OHalloran > Cc: Nathan Lynch > Cc: Michael Neuling > Cc: Anton Blanchard > Cc: Gautham R Shenoy > Cc: Vaidyanathan Srinivasan > Cc: Jordan Niethe > Signed-off-by: Srikar Dronamraju A query below. > --- > Changelog v1 -> v2: > Powerpc/smp: Create coregroup domain > Moved coregroup topology fixup to fixup_topology (Gautham) > > arch/powerpc/include/asm/topology.h | 10 ++++++++ > arch/powerpc/kernel/smp.c | 38 +++++++++++++++++++++++++++++ > arch/powerpc/mm/numa.c | 5 ++++ > 3 files changed, 53 insertions(+) > > diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h > index f0b6300e7dd3..6609174918ab 100644 > --- a/arch/powerpc/include/asm/topology.h > +++ b/arch/powerpc/include/asm/topology.h [..snip..] > @@ -91,6 +92,7 @@ enum { > smt_idx, > #endif > bigcore_idx, > + mc_idx, > die_idx, > }; > [..snip..] > @@ -879,6 +896,7 @@ static struct sched_domain_topology_level powerpc_topology[] = { > { cpu_smt_mask, powerpc_smt_flags, SD_INIT_NAME(SMT) }, > #endif > { cpu_bigcore_mask, SD_INIT_NAME(BIGCORE) }, > + { cpu_mc_mask, SD_INIT_NAME(MC) }, > { cpu_cpu_mask, SD_INIT_NAME(DIE) }, > { NULL, }, > }; [..snip..] > @@ -1386,6 +1421,9 @@ int setup_profiling_timer(unsigned int multiplier) > > static void fixup_topology(void) > { > + if (!has_coregroup_support()) > + powerpc_topology[mc_idx].mask = cpu_bigcore_mask; > + Shouldn't we move this condition after doing the fixup for shared caches ? Because if we have shared_caches, but not core_group, then we want the coregroup domain to degenerate correctly. > if (shared_caches) { > pr_info("Using shared cache scheduler topology\n"); > powerpc_topology[bigcore_idx].mask = shared_cache_mask; -- Thanks and regards gautham.