Return-Path: Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40nTCK4lMQzF2B3 for ; Fri, 18 May 2018 23:14:05 +1000 (AEST) 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 1/2] powerpc: Detect the presence of big-core with interleaved threads In-Reply-To: <20180516043516.GA14826@in.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> Date: Fri, 18 May 2018 23:14:04 +1000 Message-ID: <87k1s1xg0z.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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? 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