Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1102402imm; Mon, 21 May 2018 21:31:54 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrCCUfC0Qayuc6ScJhZwt9gh2+B0goJiMQUm/tAQ+8NAhK8lr16dTpejH35NPUsyu3NJ4uu X-Received: by 2002:a65:5244:: with SMTP id q4-v6mr17632895pgp.201.1526963514484; Mon, 21 May 2018 21:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526963514; cv=none; d=google.com; s=arc-20160816; b=yRvt5kLNEs+B/JmM5aUKemM8LuD9ejxya4A/PqFbA1d/5zX7vZvfn1MURRMKZ41WMt dM7WmAyGgr5KCK/W0GE/KeyBZrQH9dr5FuSCP9+QGe185qKoPs4KTdlw73l1fvj8WZ4V Tj/qPc4tVryONtzaS9HCH4S89hpK/1iV1zf4mktW3eMVrVSE0o5jxwjHKMDPryrP613e H8s/Iwtr6UYoYF2SjiQEZhAUvbojCsq3IKs+XYYygX/RtYrKYTek2qONUjWdrszYCI/s Deo5aPzo3LhZoFkgEYm/di4tMhwaKIVsnyzpXUgH7H1RL7lJEI2r7jJM+ZzkiFJY6vci UzTA== 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=I3xwf0NiMjYz755XK9MJRXyeDNPWvtLrxr6rZiegqKo=; b=iBdrhvJSc0UisLR3FmpiPmpkRRyfvk/Q+7AQVeofQjFPZpTEz8B5P1ZsY0tjpG+uaP 3g3JKox7RUlKh1ICejpIM48/VaKZp+KNP/wmvzNjXVWN2ZWRehxdNbfJ6cWmropg+iAY 71L5hDSTzVue8eOB2rtCIb/zTEyqYuKg9H2BBV2ZAMRJKLCBE3fgP+PfOUeQZU9wN3cI Dyx+PTL7ZYIArXnyfV6klc2xZjoIkfSiiZQx/DkRSg2P4UyKY8IFcZ74LIGE5J9E6xVN TovAfobbNmJmaJQqymiOfljtoxr2vEodEFHGm6TzRTJknr6/CN/vhAeyCNOpWclG7Ccb 7I3Q== 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 e185-v6si615306pgc.179.2018.05.21.21.31.39; Mon, 21 May 2018 21:31:54 -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 S1751107AbeEVEba (ORCPT + 99 others); Tue, 22 May 2018 00:31:30 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:44584 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750709AbeEVEb2 (ORCPT ); Tue, 22 May 2018 00:31:28 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4M4NwYi041255 for ; Tue, 22 May 2018 00:31:28 -0400 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0a-001b2d01.pphosted.com with ESMTP id 2j46jkjt78-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 22 May 2018 00:31:28 -0400 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 21 May 2018 22:31:27 -0600 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 21 May 2018 22:31:24 -0600 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4M4VNjp11534806; Mon, 21 May 2018 21:31:23 -0700 Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B10266E040; Mon, 21 May 2018 22:31:23 -0600 (MDT) Received: from sofia.ibm.com (unknown [9.124.35.22]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP id 301846E035; Mon, 21 May 2018 22:31:23 -0600 (MDT) Received: by sofia.ibm.com (Postfix, from userid 1000) id C01272E2D6F; Tue, 22 May 2018 10:01:19 +0530 (IST) Date: Tue, 22 May 2018 10:01:19 +0530 From: Gautham R Shenoy To: Michael Ellerman Cc: Gautham R Shenoy , Michael Neuling , 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 1/2] powerpc: Detect the presence of big-core with interleaved threads Reply-To: ego@linux.vnet.ibm.com References: <1526037444-22876-1-git-send-email-ego@linux.vnet.ibm.com> <1526037444-22876-2-git-send-email-ego@linux.vnet.ibm.com> <1526268071.30369.20.camel@neuling.org> <20180516043516.GA14826@in.ibm.com> <87k1s1xg0z.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k1s1xg0z.fsf@concordia.ellerman.id.au> User-Agent: Mutt/1.5.23 (2014-03-12) X-TM-AS-GCONF: 00 x-cbid: 18052204-0004-0000-0000-00001421454F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009064; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000261; SDB=6.01035843; UDB=6.00529854; IPR=6.00814971; MB=3.00021230; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-22 04:31:26 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18052204-0005-0000-0000-0000874CAC9D Message-Id: <20180522043119.GA5213@in.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-22_01:,, 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=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805220052 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Michael, On Fri, May 18, 2018 at 11:14:04PM +1000, Michael Ellerman wrote: > Gautham R Shenoy writes: > ... > >> > @@ -565,7 +615,16 @@ void __init smp_setup_cpu_maps(void) > >> > vdso_data->processorCount = num_present_cpus(); > >> > #endif /* CONFIG_PPC64 */ > >> > > >> > - /* Initialize CPU <=> thread mapping/ > >> > + dn = of_find_node_by_type(NULL, "cpu"); > >> > + if (dn) { > >> > + if (check_for_interleaved_big_core(dn)) { > >> > + has_interleaved_big_core = true; > >> > + pr_info("Detected interleaved big-cores\n"); > >> > >> Is there a runtime way to check this also? If the dmesg buffer overflows, we > >> lose this. > > > > Where do you suggest we put this ? Should it be a part of > > /proc/cpuinfo ? > > Hmm, it'd be nice not to pollute it with more junk. > > Can you just look at the pir files in sysfs? Sure Michael. I will explore this option. If we add a file called l1cache_thread_group, then the siblings of the big-core that share the L1-cache can be described as follows. # cd /sys/devices/system/cpu # grep . cpu[0-7]/l1cache_thread_group cpu0/l1cache_thread_group:0,2,4,6 cpu1/l1cache_thread_group:1,3,5,7 cpu2/l1cache_thread_group:0,2,4,6 cpu3/l1cache_thread_group:1,3,5,7 cpu4/l1cache_thread_group:0,2,4,6 cpu5/l1cache_thread_group:1,3,5,7 cpu6/l1cache_thread_group:0,2,4,6 cpu7/l1cache_thread_group:1,3,5,7 > > eg. on a normal system: > > # cd /sys/devices/system/cpu > # grep . cpu[0-7]/pir > cpu0/pir:20 > cpu1/pir:21 > cpu2/pir:22 > cpu3/pir:23 > cpu4/pir:24 > cpu5/pir:25 > cpu6/pir:26 > cpu7/pir:27 > > > cheers >