public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org,
	mingo@redhat.com, acme@kernel.org,
	alexander shishkin <alexander.shishkin@linux.intel.com>,
	jolsa@kernel.org, mhiramat@kernel.org
Subject: Re: [PATCH v2 2/3] perf: make build_cpu_topology skip offline/absent CPUs
Date: Wed, 15 Feb 2017 03:48:19 -0500 (EST)	[thread overview]
Message-ID: <956097334.4685469.1487148499443.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20170214110110.GB18546@krava>



----- Original Message -----
> From: "Jiri Olsa" <jolsa@redhat.com>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, "alexander shishkin"
> <alexander.shishkin@linux.intel.com>, jolsa@kernel.org, mhiramat@kernel.org
> Sent: Tuesday, 14 February, 2017 12:01:10 PM
> Subject: Re: [PATCH v2 2/3] perf: make build_cpu_topology skip offline/absent CPUs
> 
> On Mon, Feb 13, 2017 at 04:34:35PM +0100, Jan Stancek wrote:
> 
> SNIP
> 
> > This patch makes build_cpu_topology() skip offline/absent CPUs,
> > by checking their presence against cpu_map built from online CPUs.
> > 
> > Signed-off-by: Jan Stancek <jstancek@redhat.com>
> > ---
> >  tools/perf/util/header.c | 21 +++++++++++++++++----
> >  1 file changed, 17 insertions(+), 4 deletions(-)
> > 
> > Changes in v2:
> > - drop out label, use return NULL where possible
> > 
> > diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
> > index d89c9c7ef4e5..4b0ea4e92e9d 100644
> > --- a/tools/perf/util/header.c
> > +++ b/tools/perf/util/header.c
> > @@ -503,24 +503,31 @@ static void free_cpu_topo(struct cpu_topo *tp)
> >  
> >  static struct cpu_topo *build_cpu_topology(void)
> >  {
> > -	struct cpu_topo *tp;
> > +	struct cpu_topo *tp = NULL;
> >  	void *addr;
> >  	u32 nr, i;
> >  	size_t sz;
> >  	long ncpus;
> > -	int ret = -1;
> > +	int ret = 0;
> 
> hum, shoudn't we fail if we dont find any online cpu?
> 
> jirka

You're right, there's no reason to change this. I'll send v3.

  reply	other threads:[~2017-02-15  8:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-30 16:53 [PATCH] perf: fix topology test on systems with sparse CPUs Jan Stancek
2017-01-30 18:49 ` Jiri Olsa
2017-01-30 19:29   ` Jan Stancek
2017-01-31 16:03   ` Jan Stancek
2017-02-02 11:29     ` Jiri Olsa
2017-02-02 12:06       ` Jan Stancek
2017-02-02 13:01         ` Jiri Olsa
2017-02-13 15:34           ` [PATCH v2 1/3] perf: add cpu__max_present_cpu() Jan Stancek
2017-02-13 15:34             ` [PATCH v2 2/3] perf: make build_cpu_topology skip offline/absent CPUs Jan Stancek
2017-02-14 11:01               ` Jiri Olsa
2017-02-15  8:48                 ` Jan Stancek [this message]
2017-02-17 11:10                   ` [PATCH v3 1/3] perf: add cpu__max_present_cpu() Jan Stancek
2017-02-17 11:10                     ` [PATCH v3 2/3] perf: make build_cpu_topology skip offline/absent CPUs Jan Stancek
2017-02-17 15:36                       ` Arnaldo Carvalho de Melo
2017-02-21  8:12                       ` [tip:perf/urgent] perf header: Make " tip-bot for Jan Stancek
2017-02-17 11:10                     ` [PATCH v3 3/3] perf: replace _SC_NPROCESSORS_CONF with max_present_cpu in cpu_topology_map Jan Stancek
2017-02-17 15:05                       ` Jiri Olsa
2017-02-21  8:12                       ` [tip:perf/urgent] perf tools: Replace " tip-bot for Jan Stancek
2017-02-21  8:11                     ` [tip:perf/urgent] perf cpumap: Add cpu__max_present_cpu() tip-bot for Jan Stancek
2017-02-13 15:34             ` [PATCH v2 3/3] perf: replace _SC_NPROCESSORS_CONF with max_present_cpu in cpu_topology_map Jan Stancek
2017-02-14 11:17             ` [PATCH v2 1/3] perf: add cpu__max_present_cpu() Jiri Olsa
2017-02-02 11:29     ` [PATCH] perf: fix topology test on systems with sparse CPUs Jiri Olsa
2017-01-30 18:49 ` Jiri Olsa
2017-01-30 18:49 ` Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=956097334.4685469.1487148499443.JavaMail.zimbra@redhat.com \
    --to=jstancek@redhat.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox