Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4493520imm; Fri, 18 May 2018 06:07:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq+1X1GvwGbQwILqQiZKARgxRG6ArKEDYNBU0vboJKpaUmY4uYOu7hYrBnlUqO/MEMzLjp3 X-Received: by 2002:a17:902:8a8c:: with SMTP id p12-v6mr9272347plo.94.1526648829015; Fri, 18 May 2018 06:07:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526648828; cv=none; d=google.com; s=arc-20160816; b=FKSBl6Z6u/7ZVwi+NO3fvvKx//ATmL4Aw1qubHONUpS4ENejXyvHL9ejxg9yBR1pEx LF0J5R3VsjNjNo0BqB4FK3xh/h+Q5uIfiNltH8vQYpv5Dm2FVP/ExM7KiJ7HhwE+NyLE IDJTn5BaVbWkTrkVeWCBURs1/cbIcNq9+WSM8gm7gRdIGhYJzy1UR7jUDrLor6zpzmad RhtLCMDDSmy62bzBUsrqcAY4vgDbWwnsW1HMM0BnURqP7DBVpx/qwWmESSjH0MS3KlMb gTnXLwfJWxbhDfSpC/nXbH1XH9QLIPV2tCZjBj6cgRJWqqx1/zRjwaOjYIPVcS87fQK5 Q+Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:arc-authentication-results; bh=GNrMugY7I5sHax7cKC+6u46v1/CBxVkj7DHTEzQ2k9Q=; b=CiB+p2+xY7F97pjRbtmrowuR5NRx0cJex8hFLZFb0eRCD/mY2+1N33CUX/S0WqPhqP bEljQJDe2SKV3on0KGFhne+4T283bvRCbAs4LsQTeg9ptbPeWenVx7Ve57lhX8aT1Uhm qKGILBlHlphbv3pgYgPvmqMuEDRluq0JpTrpURRN5iz4+jyfQSjs0tVDlbb1qImiDlG6 hmh7PdckiVOHa21hy/Ib9rTFoRhhlBSYNA9yIw+lP8nGjX4JRIQ9X5XO63uenz6AM7iu 7aM2Qune/tlVglao1GlNZP44xj+H8ZPdLRyVirYe2XKvO7ucUKXRUwtuZ9aJK4mxHIEM WrhA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q11-v6si5835585pgv.661.2018.05.18.06.06.53; Fri, 18 May 2018 06:07:08 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752600AbeERNGd (ORCPT + 99 others); Fri, 18 May 2018 09:06:33 -0400 Received: from ozlabs.org ([203.11.71.1]:34489 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752662AbeERNGA (ORCPT ); Fri, 18 May 2018 09:06:00 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 40nT1x6GDJz9s33; Fri, 18 May 2018 23:05:57 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: Gautham R Shenoy , Michael Neuling Cc: "Gautham R. Shenoy" , 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 In-Reply-To: <20180516050508.GB14826@in.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> <20180516050508.GB14826@in.ibm.com> Date: Fri, 18 May 2018 23:05:57 +1000 Message-ID: <87muwxxgei.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Gautham R Shenoy writes: > 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. The above code is the only use of the feature, so I don't think we need to worry about any other connotations. > 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 Yeah let's do that. cheers