Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1580484

Re: [PATCH v2 1/3] perf: add cpu__max_present_cpu()

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/3] perf: add cpu__max_present_cpu()
Date 2017-02-14 12:20 +0100
Message-ID <taJjj-1cM-3@gated-at.bofh.it> (permalink)
References <t6pjc-4nr-21@gated-at.bofh.it> <taqTn-5xK-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Feb 13, 2017 at 04:34:34PM +0100, Jan Stancek wrote:
> Similar to cpu__max_cpu() (which returns max possible CPU),
> returns max present CPU.
> 
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---
>  tools/perf/util/cpumap.c | 22 ++++++++++++++++++++++
>  tools/perf/util/cpumap.h |  1 +
>  2 files changed, 23 insertions(+)
> 
> diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c
> index 2c0b52264a46..8c7504939113 100644
> --- a/tools/perf/util/cpumap.c
> +++ b/tools/perf/util/cpumap.c
> @@ -9,6 +9,7 @@
>  #include "asm/bug.h"
>  
>  static int max_cpu_num;
> +static int max_present_cpu_num;

I think it'd be less confusing for me if we follow the kernel names here

 static int max_cpu_possible;
 static int max_cpu_present;

also I wonder we should use 

 static int max_cpu_online;

instead of:

 sysconf(_SC_NPROCESSORS_ONLN)

but we can do it all later on as follow up

jirka

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] perf: fix topology test on systems with sparse CPUs Jiri Olsa <jolsa@redhat.com> - 2017-01-30 19:50 +0100
  Re: [PATCH] perf: fix topology test on systems with sparse CPUs Jan Stancek <jstancek@redhat.com> - 2017-01-30 20:30 +0100
  Re: [PATCH] perf: fix topology test on systems with sparse CPUs Jan Stancek <jstancek@redhat.com> - 2017-01-31 17:10 +0100
    Re: [PATCH] perf: fix topology test on systems with sparse CPUs Jiri Olsa <jolsa@redhat.com> - 2017-02-02 12:30 +0100
      Re: [PATCH] perf: fix topology test on systems with sparse CPUs Jan Stancek <jstancek@redhat.com> - 2017-02-02 13:10 +0100
        Re: [PATCH] perf: fix topology test on systems with sparse CPUs Jiri Olsa <jolsa@redhat.com> - 2017-02-02 14:10 +0100
          [PATCH v2 1/3] perf: add cpu__max_present_cpu() Jan Stancek <jstancek@redhat.com> - 2017-02-13 16:40 +0100
            [PATCH v2 2/3] perf: make build_cpu_topology skip offline/absent CPUs Jan Stancek <jstancek@redhat.com> - 2017-02-13 16:40 +0100
              Re: [PATCH v2 2/3] perf: make build_cpu_topology skip offline/absent  CPUs Jiri Olsa <jolsa@redhat.com> - 2017-02-14 12:10 +0100
                Re: [PATCH v2 2/3] perf: make build_cpu_topology skip  offline/absent CPUs Jan Stancek <jstancek@redhat.com> - 2017-02-15 09:50 +0100
                [PATCH v3 1/3] perf: add cpu__max_present_cpu() Jan Stancek <jstancek@redhat.com> - 2017-02-17 12:20 +0100
                [PATCH v3 2/3] perf: make build_cpu_topology skip offline/absent CPUs Jan Stancek <jstancek@redhat.com> - 2017-02-17 12:20 +0100
                Re: [PATCH v3 2/3] perf: make build_cpu_topology skip offline/absent  CPUs Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-17 16:40 +0100
                [tip:perf/urgent] perf header: Make build_cpu_topology skip  offline/absent CPUs tip-bot for Jan Stancek <tipbot@zytor.com> - 2017-02-21 09:20 +0100
                [PATCH v3 3/3] perf: replace _SC_NPROCESSORS_CONF with max_present_cpu in cpu_topology_map Jan Stancek <jstancek@redhat.com> - 2017-02-17 12:20 +0100
                Re: [PATCH v3 3/3] perf: replace _SC_NPROCESSORS_CONF with  max_present_cpu in cpu_topology_map Jiri Olsa <jolsa@redhat.com> - 2017-02-17 16:10 +0100
                [tip:perf/urgent] perf tools: Replace _SC_NPROCESSORS_CONF with  max_present_cpu in cpu_topology_map tip-bot for Jan Stancek <tipbot@zytor.com> - 2017-02-21 09:20 +0100
                [tip:perf/urgent] perf cpumap: Add cpu__max_present_cpu() tip-bot for Jan Stancek <tipbot@zytor.com> - 2017-02-21 09:20 +0100
            Re: [PATCH v2 1/3] perf: add cpu__max_present_cpu() Jiri Olsa <jolsa@redhat.com> - 2017-02-14 12:20 +0100
    Re: [PATCH] perf: fix topology test on systems with sparse CPUs Jiri Olsa <jolsa@redhat.com> - 2017-02-02 12:40 +0100

csiph-web