From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759455AbbFBPre (ORCPT ); Tue, 2 Jun 2015 11:47:34 -0400 Received: from mail-ie0-f178.google.com ([209.85.223.178]:33048 "EHLO mail-ie0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759109AbbFBPr0 (ORCPT ); Tue, 2 Jun 2015 11:47:26 -0400 MIME-Version: 1.0 X-Originating-IP: [212.179.42.66] In-Reply-To: <20150602102610.2772a2e6@gandalf.local.home> References: <1433251589-21013-1-git-send-email-gilf@ezchip.com> <1433251589-21013-3-git-send-email-gilf@ezchip.com> <20150602102610.2772a2e6@gandalf.local.home> Date: Tue, 2 Jun 2015 18:47:25 +0300 Message-ID: Subject: Re: [PATCH 2/2] tracing: Fix for non-continuous cpu ids From: Gilad Ben-Yossef To: Steven Rostedt Cc: Gil Fruchter , Ingo Molnar , "linux-kernel@vger.kernel.org" , Gilad Ben-Yossef , Chris Metcalf , noamc@ezchip.com Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 2, 2015 at 5:26 PM, Steven Rostedt wrote: > On Tue, 2 Jun 2015 16:26:29 +0300 > Gil Fruchter wrote: > >> Currently exception occures due to access beyond buffer_iter >> range while using index of cpu bigger than num_possible_cpus(). >> Below there is an example for such exception when we use >> cpus 0,1,16,17. > > I'm curious, what broken boxes have non-continuous cpu ids? The NPS-400 is a single SoC with 256 cores based on Synopsys Arc, each one is capable to work as up to 16 SMT hardware threads or logical cores. I gave a talk about it two years ago at Plumbers/LinuxCon. Most of the Linux support is in the process being up-streamed via the Arc architecture maintainer (the patch set is at https://github.com/EZchip/linux) but there are some none architecture specific patches that we just happen to run into like this one. As to the why, well, the CPU ids has a mapping to the topology - which cluster (NUMA node), core and SMT thread you are looking at. The thing is, the number of SMT threads per core is configurable, and you can hot plug down a core, reconfigure it for a different number of SMT thread and hot them back in. So the "empty slots" are possible logical cores that don't happen to be active at the time, but could hotplug up later on. I hope this makes some sense. Since the NPS-400 is not generally available yet I wouldn't worry too much about stable kernel for now... Thanks, Gilad Ben-Yossef -- Gilad Ben-Yossef Chief Coffee Drinker gilad@benyossef.com Israel Cell: +972-52-8260388 US Cell: +1-973-8260388 http://benyossef.com "If you take a class in large-scale robotics, can you end up in a situation where the homework eats your dog?" -- Jean-Baptiste Queru