Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1515735imm; Tue, 15 May 2018 22:05:44 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrGPlSByHLwOV96+Fs8TQsrZPNBdlcBkOS3wn6QcT6fdxc9r5tcstRAnZgNV6hjZdfXwK8K X-Received: by 2002:a17:902:42a3:: with SMTP id h32-v6mr4690676pld.72.1526447144932; Tue, 15 May 2018 22:05:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526447144; cv=none; d=google.com; s=arc-20160816; b=ffl8LGfW7pJeamRRUAHEmSRHiAQMs2V17IgWRZNcCyq43gxOTvUUJA/U7rUkEIilkK pLmbGL4okjz+eL6Hv/QyIHObGlyiYbxIqlvyfXtMoUFFDasPjRkjhtc3d3eTh0fBk58H NLg5Thh+why0pp1gdDVyxXnOarhDCu16FypZEVjf/9jNUg/7nQfetozdViJb4igDS15s Nf+6a+F6zRFcKYkqyMhSULqhjkyoX14IZpTs4+vYMbPTvpmNChAOhrBdP9j9nZ0Xf3k5 S7dJbOXa83k7PXLsrptenhzjU+UiCeXG7sQHEBlqNQIb6DJP2Kgy2FPlh4it1Zmhvid1 Dg3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date:arc-authentication-results; bh=uxOsp6ZGyZn4ePZoZYXcIt1jfkEEkyP+C/awCJsHsZ8=; b=fSPQRB93xIvruSwv+Ph40daEnIOYWLeDXu+8sLrOoPq7uxpmBtby2mX9q5SS8cbH0c QCDAMqzxYt+/9sYY4LCr8lcMFlPO7aXittKbNMChutlfHChARJcGG7IBEVxvVlMyYWRH vnBZ2dGZ1JJI4ADn1mnc2z0Ydeh1213euzYOrLdIhrVoQsktqGE/zhGnFZ8tjii87UuI AaDvH6EqZYe8Dysxg6XCoeOyKvPQLqv+FHOpwBcEtB465KWOYbIeG9TTsd/JmDYRdRPe XUXxA8IWOBKfVg6fe5UF6voo6XUmYrRbGeCwI9NkaSWj4UDHVjouj1J7RW8kkhrbSYmJ qzMw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q12-v6si1954437pli.419.2018.05.15.22.05.30; Tue, 15 May 2018 22:05:44 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751471AbeEPFFU (ORCPT + 99 others); Wed, 16 May 2018 01:05:20 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:59236 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750775AbeEPFFS (ORCPT ); Wed, 16 May 2018 01:05:18 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4G4xZ0C035927 for ; Wed, 16 May 2018 01:05:18 -0400 Received: from e15.ny.us.ibm.com (e15.ny.us.ibm.com [129.33.205.205]) by mx0b-001b2d01.pphosted.com with ESMTP id 2j0dy2rh8v-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 16 May 2018 01:05:18 -0400 Received: from localhost by e15.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 16 May 2018 01:05:17 -0400 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e15.ny.us.ibm.com (146.89.104.202) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 16 May 2018 01:05:13 -0400 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4G55A2K52101354; Wed, 16 May 2018 05:05:12 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 92790AC03A; Wed, 16 May 2018 01:06:45 -0400 (EDT) Received: from sofia.ibm.com (unknown [9.124.35.22]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP id 5C58CAC040; Wed, 16 May 2018 01:06:45 -0400 (EDT) Received: by sofia.ibm.com (Postfix, from userid 1000) id 8C6912E2DB1; Wed, 16 May 2018 10:35:08 +0530 (IST) Date: Wed, 16 May 2018 10:35:08 +0530 From: Gautham R Shenoy To: Michael Neuling Cc: "Gautham R. Shenoy" , Michael Ellerman , Benjamin Herrenschmidt , Vaidyanathan Srinivasan , Akshay Adiga , Shilpasri G Bhat , Balbir Singh , "Oliver O'Halloran" , Nicholas Piggin , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] powerpc: Enable ASYM_SMT on interleaved big-core systems Reply-To: ego@linux.vnet.ibm.com References: <1526037444-22876-1-git-send-email-ego@linux.vnet.ibm.com> <1526037444-22876-3-git-send-email-ego@linux.vnet.ibm.com> <1526268127.30369.21.camel@neuling.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1526268127.30369.21.camel@neuling.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-TM-AS-GCONF: 00 x-cbid: 18051605-0036-0000-0000-000002F5897E X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009032; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000260; SDB=6.01032974; UDB=6.00528138; IPR=6.00812105; MB=3.00021139; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-16 05:05:15 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18051605-0037-0000-0000-0000445A0276 Message-Id: <20180516050508.GB14826@in.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-16_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805160050 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 14, 2018 at 01:22:07PM +1000, Michael Neuling wrote: > On Fri, 2018-05-11 at 16:47 +0530, Gautham R. Shenoy wrote: > > From: "Gautham R. Shenoy" > > > > Each of the SMT4 cores forming a fused-core are more or less > > independent units. Thus when multiple tasks are scheduled to run on > > the fused core, we get the best performance when the tasks are spread > > across the pair of SMT4 cores. > > > > Since the threads in the pair of SMT4 cores of an interleaved big-core > > are numbered {0,2,4,6} and {1,3,5,7} respectively, enable ASYM_SMT on > > such interleaved big-cores that will bias the load-balancing of tasks > > on smaller numbered threads, which will automatically result in > > spreading the tasks uniformly across the associated pair of SMT4 > > cores. > > > > Signed-off-by: Gautham R. Shenoy > > --- > > arch/powerpc/kernel/smp.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c > > index 9ca7148..0153f01 100644 > > --- a/arch/powerpc/kernel/smp.c > > +++ b/arch/powerpc/kernel/smp.c > > @@ -1082,7 +1082,7 @@ static int powerpc_smt_flags(void) > > { > > int flags = SD_SHARE_CPUCAPACITY | SD_SHARE_PKG_RESOURCES; > > > > - if (cpu_has_feature(CPU_FTR_ASYM_SMT)) { > > + if (cpu_has_feature(CPU_FTR_ASYM_SMT) || has_interleaved_big_core) { > > Shouldn't we just set CPU_FTR_ASYM_SMT and leave this code unchanged? Yes, that would have the same effect. I refrained from doing that since I thought CPU_FTR_ASYM_SMT has the "lower numbered threads expedite thread-folding" connotation from the POWER7 generation. If it is ok to overload CPU_FTR_ASYM_SMT, we can do what you suggest and have all the changes in setup-common.c -- Thanks and Regards gautham.