From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 968B6C433DF for ; Wed, 22 Jul 2020 05:59:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7911C20771 for ; Wed, 22 Jul 2020 05:59:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728592AbgGVF7n (ORCPT ); Wed, 22 Jul 2020 01:59:43 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:16750 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726736AbgGVF7m (ORCPT ); Wed, 22 Jul 2020 01:59:42 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06M5WnEI050937; Wed, 22 Jul 2020 01:59:34 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 32dn6ycw4b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Jul 2020 01:59:34 -0400 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06M5YZZL054819; Wed, 22 Jul 2020 01:59:33 -0400 Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com with ESMTP id 32dn6ycw44-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Jul 2020 01:59:33 -0400 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06M5oWBl019999; Wed, 22 Jul 2020 05:59:33 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma02dal.us.ibm.com with ESMTP id 32brq9htwc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Jul 2020 05:59:32 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06M5xRkE39321906 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Jul 2020 05:59:27 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4B1196E04E; Wed, 22 Jul 2020 05:59:30 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AF37F6E050; Wed, 22 Jul 2020 05:59:29 +0000 (GMT) Received: from sofia.ibm.com (unknown [9.85.82.72]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 22 Jul 2020 05:59:29 +0000 (GMT) Received: by sofia.ibm.com (Postfix, from userid 1000) id 36EED2E3C48; Wed, 22 Jul 2020 11:29:25 +0530 (IST) Date: Wed, 22 Jul 2020 11:29:25 +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 04/10] powerpc/smp: Enable small core scheduling sooner Message-ID: <20200722055925.GC31038@in.ibm.com> Reply-To: ego@linux.vnet.ibm.com References: <20200721113814.32284-1-srikar@linux.vnet.ibm.com> <20200721113814.32284-5-srikar@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200721113814.32284-5-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_02:2020-07-21,2020-07-22 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 impostorscore=0 mlxscore=0 malwarescore=0 clxscore=1015 bulkscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=999 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007220040 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Srikar, On Tue, Jul 21, 2020 at 05:08:08PM +0530, Srikar Dronamraju wrote: > Enable small core scheduling as soon as we detect that we are in a > system that supports thread group. Doing so would avoid a redundant > check. The patch looks good to me. However, I think the commit message still reflect the v1 code where we were moving the functionality from smp_cpus_done() to init_big_cores(). In this we are moving it to a helper function to collate all fixups to topology. > > 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 > --- > Changelog v1 -> v2: > powerpc/smp: Enable small core scheduling sooner > Restored the previous info msg (Jordan) > Moved big core topology fixup to fixup_topology (Gautham) > > arch/powerpc/kernel/smp.c | 17 +++++++++++------ > 1 file changed, 11 insertions(+), 6 deletions(-) > > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c > index 1ce95da00cb6..72f16dc0cb26 100644 > --- a/arch/powerpc/kernel/smp.c > +++ b/arch/powerpc/kernel/smp.c > @@ -1370,6 +1370,16 @@ int setup_profiling_timer(unsigned int multiplier) > return 0; > } > > +static void fixup_topology(void) > +{ > +#ifdef CONFIG_SCHED_SMT > + if (has_big_cores) { > + pr_info("Big cores detected but using small core scheduling\n"); > + powerpc_topology[0].mask = smallcore_smt_mask; > + } > +#endif > +} > + > void __init smp_cpus_done(unsigned int max_cpus) > { > /* > @@ -1383,12 +1393,7 @@ void __init smp_cpus_done(unsigned int max_cpus) > > dump_numa_cpu_topology(); > > -#ifdef CONFIG_SCHED_SMT > - if (has_big_cores) { > - pr_info("Big cores detected but using small core scheduling\n"); > - powerpc_topology[0].mask = smallcore_smt_mask; > - } > -#endif > + fixup_topology(); > set_sched_topology(powerpc_topology); > } > > -- > 2.17.1 >