Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4502397imm; Fri, 18 May 2018 06:14:56 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqFLisMwFdzstxOkG6CsxsLeEfp0da1LekhBmHvCgMzWl84qeSQitrbHNuDMwHEh8XUswUU X-Received: by 2002:a62:32c6:: with SMTP id y189-v6mr9350185pfy.241.1526649296769; Fri, 18 May 2018 06:14:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526649296; cv=none; d=google.com; s=arc-20160816; b=xbBcC5+UkpR439QsX9N7BNce6KpBDkjKljlJqpnDFBtKCMhfv7ZiOPxERNZvO4WtEN YcRA7u9mBu1rZhDAzEA1x08dW29yaP89UOXx6NF7qZrFMhRQQuvvGkcisi0vY9TThSTr LtFBwK88saNGnnptGIXkGJVCuqs52ReM4mfOJox7JfH2nsIDEzZURaIlkBVkG1dFT39K yvzdm4LhVNcobOnmP6/Yyu/EVfXO2yJcSfeGgKnuk7Ty8dHfN3PksNphym6j07uhS3Co jbr2bKZ9vfw+th1fzMEKX5WBRO5FBqbfnzUj9cf1z8Ucorva0bg6bYIDp99DumnmFw1S jp1g== 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=2wF8Z1UeN6EcXDohdotlIBTUjp/DFGSyvaR/ypjtPxU=; b=lVLV7zaJ8dHcnKn13WACqU0g5w9IRhyJaR6/Wa9yvZYYixmMnpvH+hyT38UY8TRXps +iJR892yCMyhCejaCwRGCZyS7vRBC2o+2f6+DVcOTgI/Ywkcs1DQVk/GJBIoguSb7Wt6 ln+i0MeP1mY1Kfv6lmZm19NM6zBVRiGkHpuK3kUjeCc1exnEm8HIi0Fci2gmmm/dbK74 kVh924SI0vrvCwbeUPzLuJ9QcCGAG87SuZ0xaNnl9A7l9mievyyhyomNxAzNCyGBPszC 2UlSIb9WNf0cdkoX6/raUsfMUPwFrf0Qfu67gI51h3O9kX2UUSdi4K9gAYXXCHUVXIPm sLTQ== 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 az8-v6si7530925plb.347.2018.05.18.06.14.42; Fri, 18 May 2018 06:14:56 -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 S1752337AbeERNOH (ORCPT + 99 others); Fri, 18 May 2018 09:14:07 -0400 Received: from ozlabs.org ([203.11.71.1]:55491 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751395AbeERNOG (ORCPT ); Fri, 18 May 2018 09:14:06 -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 40nTCK2S5Vz9s08; Fri, 18 May 2018 23:14:05 +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 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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