From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754146AbdA3StO (ORCPT ); Mon, 30 Jan 2017 13:49:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60902 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753949AbdA3StM (ORCPT ); Mon, 30 Jan 2017 13:49:12 -0500 Date: Mon, 30 Jan 2017 19:49:08 +0100 From: Jiri Olsa To: Jan Stancek Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, jolsa@kernel.org, mhiramat@kernel.org, rui.teng@linux.vnet.ibm.com, sukadev@linux.vnet.ibm.com Subject: Re: [PATCH] perf: fix topology test on systems with sparse CPUs Message-ID: <20170130184908.GB28444@krava> References: <290bf2031885722414cb1ae031869094a18b0580.1485794959.git.jstancek@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <290bf2031885722414cb1ae031869094a18b0580.1485794959.git.jstancek@redhat.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 30 Jan 2017 18:49:12 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 30, 2017 at 05:53:34PM +0100, Jan Stancek wrote: SNIP > + ret = build_cpu_topo(tp, cpu); > if (ret < 0) > break; > } > + > +out_free: > + cpu_map__put(map); > if (ret) { > free_cpu_topo(tp); > tp = NULL; > } > +out: > return tp; > } > > @@ -575,7 +579,7 @@ static int write_cpu_topology(int fd, struct perf_header *h __maybe_unused, > if (ret < 0) > goto done; > > - for (j = 0; j < perf_env.nr_cpus_avail; j++) { > + for (j = 0; j < perf_env.nr_cpus_online; j++) { so basically we're changing from avail to online cpus have you checked all the users of this FEATURE if such change is ok? I can't find any after quick search, but it would be good to be sure and mention that in changelog thanks, jirka