Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2043446imm; Thu, 9 Aug 2018 06:28:28 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxSJmtoq7xtWxKYVrmoZz8A6YO+vEkJqw5CBY819t9NTUTVoGUPJwqBa9284PwOyxr12UPH X-Received: by 2002:a62:e0d5:: with SMTP id d82-v6mr2410639pfm.59.1533821308200; Thu, 09 Aug 2018 06:28:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533821308; cv=none; d=google.com; s=arc-20160816; b=yMlK94m5pNndBe1fYze6RX1mDkYmprPYNhXGEh+yFAevzfQ2+k16FzBejuf59DlRVR vXGSjSQqt094rSgTFXNuHuTC0rsbQw/b5F+c3yid5RvcDm3wIT+hAzC+wY2L6DH5ieR+ wTEYueuePr8qa4zKLSXq77fzKsPXcuGZGziXUsnjOX55UXLZkTKDH01E+58sNphocy6i 3BFwdKpMOBLXutD/JgdOxNfElbmXuEUPjy6D7IiHD5ibGNcb07/5D8z4mynJUmKIe4CN 5zu3RGVBKIr2+B+Qm8Vj2OoaeGFms5VBL0uVFnAVtrFrDWhSh8IwqsQvViEyrwFSZ5rx SNqw== 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=jHrjSuuYP1iC7G1uBw804hactaMpduZPxar8M5ePwZM=; b=uDsXfmO4F+fPjwYnCNlZnj8OyRzMpUYrtBzidgmJxvT7MEK/k3bc3u1cKJN6rXng3Z 7C+fUv7h2vuxNvkPOnUhZmokq+1plNd5lh+EPFhgkysYmLmJTPvCj0+ju6uDaS93wk3k qXKKb3kVQkiLn1h9RTnmDYK5RLefzMKE7AXp8Zn1QX/+ldQj5WaveyPJOx20B4jNBzf0 shKzmMdfxnVXjZTi4lQTSKJvekVD4EoK6DUNYiwKCk+Mq2K/4c+zjXOBqXD0ffs/F4ly D6qPcGlMwyVqdu5wKW1Y39doaJgrt+an6y6mTJoKKH6Ec/0GfwMY+8x1x8r4uVGNw4I5 54vA== 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 i24-v6si6728713pgj.228.2018.08.09.06.28.13; Thu, 09 Aug 2018 06:28:28 -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 S1732138AbeHIPwB (ORCPT + 99 others); Thu, 9 Aug 2018 11:52:01 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:44934 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730419AbeHIPwB (ORCPT ); Thu, 9 Aug 2018 11:52:01 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w79DOBoB063336 for ; Thu, 9 Aug 2018 09:27:06 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2krmxsvd38-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 09 Aug 2018 09:27:05 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 9 Aug 2018 14:27:03 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 9 Aug 2018 14:27:01 +0100 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w79DR0SY21758152 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 9 Aug 2018 13:27:00 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2CE7842041; Thu, 9 Aug 2018 16:27:08 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 304AC4203F; Thu, 9 Aug 2018 16:27:06 +0100 (BST) Received: from linux.vnet.ibm.com (unknown [9.40.192.68]) by d06av24.portsmouth.uk.ibm.com (Postfix) with SMTP; Thu, 9 Aug 2018 16:27:06 +0100 (BST) Date: Thu, 9 Aug 2018 06:26:57 -0700 From: Srikar Dronamraju To: "Gautham R. Shenoy" Cc: Michael Ellerman , Benjamin Herrenschmidt , Michael Neuling , Vaidyanathan Srinivasan , Akshay Adiga , Shilpasri G Bhat , "Oliver O'Halloran" , Nicholas Piggin , Murilo Opsfelder Araujo , Anton Blanchard , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 2/2] powerpc: Use cpu_smallcore_sibling_mask at SMT level on bigcores Reply-To: Srikar Dronamraju References: <1533792728-6304-1-git-send-email-ego@linux.vnet.ibm.com> <1533792728-6304-3-git-send-email-ego@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1533792728-6304-3-git-send-email-ego@linux.vnet.ibm.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 18080913-0020-0000-0000-000002B4664F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18080913-0021-0000-0000-000021017A06 Message-Id: <20180809132657.GA42474@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-09_05:,, 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 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808090140 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Gautham R. Shenoy [2018-08-09 11:02:08]: > > 3) ppc64_cpu --smt=2 > SMT domain ceases to exist as each domain consists of just one > group. > When seen in isolation, the above looks as if ppc64_cpu --smt=2 o/p says " SMT domain ceases to exist...." > @@ -999,7 +1012,17 @@ static void add_cpu_to_masks(int cpu) > { > int first_thread = cpu_first_thread_sibling(cpu); > int chipid = cpu_to_chip_id(cpu); > - int i; > + > + struct thread_groups tg; > + int i, cpu_group_start = -1; > + > + if (has_big_cores) { > + struct device_node *dn = of_get_cpu_node(cpu, NULL); > + Not checking for validity of dn and no of_node_puts? > + parse_thread_groups(dn, &tg); > + cpu_group_start = get_cpu_thread_group_start(cpu, &tg); > + cpumask_set_cpu(cpu, cpu_smallcore_sibling_mask(cpu)); > + } > > /* > * This CPU will not be in the online mask yet so we need to manually The rest looks good