[{"id":1760709,"web_url":"http://patchwork.ozlabs.org/comment/1760709/","msgid":"<87inh4tcs8.fsf@concordia.ellerman.id.au>","date":"2017-08-31T07:30:15","subject":"Re: [PATCH 4/4] powerpc/smp: Add Power9 scheduler topology","submitter":{"id":46580,"url":"http://patchwork.ozlabs.org/api/people/46580/","name":"Michael Ellerman","email":"mpe@ellerman.id.au"},"content":"Oliver O'Halloran <oohall@gmail.com> writes:\n\n> diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c\n> index 46f071cedf31..7b2ed0d6fc96 100644\n> --- a/arch/powerpc/kernel/smp.c\n> +++ b/arch/powerpc/kernel/smp.c\n> @@ -1043,7 +1081,19 @@ void __init smp_cpus_done(unsigned int max_cpus)\n>  \n>  \tdump_numa_cpu_topology();\n>  \n> -\tset_sched_topology(powerpc_topology);\n> +\t/*\n> +\t * If any CPU detects that it's sharing a cache with another CPU then\n> +\t * use the deeper topology that is aware of this sharing.\n> +\t */\n> +\tif (shared_caches) {\n> +\t\tpr_info(\"Using shared cache scheduler topology\\n\");\n> +\t\tset_sched_topology(power9_topology);\n> +\t\t/* HACK: warn if we're using this on anything by P9 */\n> +\t\tWARN_ON((mfspr(SPRN_PVR) & 0xffffff00) != 0x004e0100);\n\nUm, yuck.\n\nWhy are we doing that?\n\ncheers","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjYvx21Kzz9sNc\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 17:31:25 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xjYvx1DbWzDqlx\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 17:31:25 +1000 (AEST)","from ozlabs.org (bilbo.ozlabs.org [103.22.144.67])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xjYtc1zrkzDqGZ\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 31 Aug 2017 17:30:16 +1000 (AEST)","from authenticated.ozlabs.org (localhost [127.0.0.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPSA id 3xjYtc02JTz9sNc;\n\tThu, 31 Aug 2017 17:30:15 +1000 (AEST)"],"From":"Michael Ellerman <mpe@ellerman.id.au>","To":"Oliver O'Halloran <oohall@gmail.com>, linuxppc-dev@lists.ozlabs.org","Subject":"Re: [PATCH 4/4] powerpc/smp: Add Power9 scheduler topology","In-Reply-To":"<20170629071256.8159-5-oohall@gmail.com>","References":"<20170629071256.8159-1-oohall@gmail.com>\n\t<20170629071256.8159-5-oohall@gmail.com>","User-Agent":"Notmuch/0.21 (https://notmuchmail.org)","Date":"Thu, 31 Aug 2017 17:30:15 +1000","Message-ID":"<87inh4tcs8.fsf@concordia.ellerman.id.au>","MIME-Version":"1.0","Content-Type":"text/plain","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"mikey@neuling.org, Oliver O'Halloran <oohall@gmail.com>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1760924,"web_url":"http://patchwork.ozlabs.org/comment/1760924/","msgid":"<20170831123353.GA37619@linux.vnet.ibm.com>","date":"2017-08-31T12:33:53","subject":"Re: [PATCH 4/4] powerpc/smp: Add Power9 scheduler topology","submitter":{"id":11795,"url":"http://patchwork.ozlabs.org/api/people/11795/","name":"Srikar Dronamraju","email":"srikar@linux.vnet.ibm.com"},"content":"> +static struct sched_domain_topology_level power9_topology[] = {\n> +#ifdef CONFIG_SCHED_SMT\n> +\t{ cpu_smt_mask, powerpc_smt_flags, SD_INIT_NAME(SMT) },\n> +#endif\n> +\t{ shared_cache_mask, powerpc_shared_cache_flags, SD_INIT_NAME(CACHE) },\n> +\t{ cpu_cpu_mask, SD_INIT_NAME(DIE) },\n> +\t{ NULL, },\n> +};\n> +\n\nShould we name this domain as MC instead of CACHE. Then it would be\ncompatible with other archs like x86/arm/s390. MC stands for Multi-Core\nso it gels with what we have.\n\nAlso we could enable CONFIG_SCHED_MC and reuse cpu_core_flags() instead\nof adding powerpc_shared_cache_flags.","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjhkD6QTfz9s7g\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 22:38:28 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xjhkD5bXjzDrKG\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 22:38:28 +1000 (AEST)","from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n\t[148.163.158.5])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xjhdG1JG7zDqZq\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 31 Aug 2017 22:34:09 +1000 (AEST)","from pps.filterd (m0098420.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv7VCY60U093576\n\tfor <linuxppc-dev@lists.ozlabs.org>; Thu, 31 Aug 2017 08:34:07 -0400","from e23smtp03.au.ibm.com (e23smtp03.au.ibm.com [202.81.31.145])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 2cpdd6s83w-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <linuxppc-dev@lists.ozlabs.org>; Thu, 31 Aug 2017 08:34:07 -0400","from localhost\n\tby e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <linuxppc-dev@lists.ozlabs.org> from <srikar@linux.vnet.ibm.com>; \n\tThu, 31 Aug 2017 22:33:58 +1000","from d23relay07.au.ibm.com (202.81.31.226)\n\tby e23smtp03.au.ibm.com (202.81.31.209) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tThu, 31 Aug 2017 22:33:55 +1000","from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138])\n\tby d23relay07.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n\tv7VCXt3t34275472\n\tfor <linuxppc-dev@lists.ozlabs.org>; Thu, 31 Aug 2017 22:33:55 +1000","from d23av02.au.ibm.com (localhost [127.0.0.1])\n\tby d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id\n\tv7VCXjpX026058\n\tfor <linuxppc-dev@lists.ozlabs.org>; Thu, 31 Aug 2017 22:33:46 +1000","from linux.vnet.ibm.com (kernel.aus.stglabs.ibm.com [9.40.192.68])\n\tby d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id\n\tv7VCXitV025983; Thu, 31 Aug 2017 22:33:44 +1000"],"Date":"Thu, 31 Aug 2017 05:33:53 -0700","From":"Srikar Dronamraju <srikar@linux.vnet.ibm.com>","To":"\"Oliver O'Halloran\" <oohall@gmail.com>","Subject":"Re: [PATCH 4/4] powerpc/smp: Add Power9 scheduler topology","References":"<20170629071256.8159-1-oohall@gmail.com>\n\t<20170629071256.8159-5-oohall@gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","In-Reply-To":"<20170629071256.8159-5-oohall@gmail.com>","User-Agent":"Mutt/1.5.24 (2015-08-30)","X-TM-AS-MML":"disable","x-cbid":"17083112-0008-0000-0000-00000154C951","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17083112-0009-0000-0000-00000987D4F8","Message-Id":"<20170831123353.GA37619@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-08-31_04:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1708310188","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Reply-To":"Srikar Dronamraju <srikar@linux.vnet.ibm.com>","Cc":"mikey@neuling.org, linuxppc-dev@lists.ozlabs.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}}]