lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 1 Aug 2019 11:35:15 -0300
From:   Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To:     Jiri Olsa <jolsa@...nel.org>
Cc:     Satheesh Rajendran <sathnaga@...ux.vnet.ibm.com>,
        Michael Petlan <mpetlan@...hat.com>,
        lkml <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH] perf bench numa: Fix cpu0 binding

Em Thu, Aug 01, 2019 at 04:26:42PM +0200, Jiri Olsa escreveu:
> Michael reported an issue with perf bench numa failing with
> binding to cpu0 with '-0' option.
> 
>   # perf bench numa mem -p 3 -t 1 -P 512 -s 100 -zZcm0 --thp 1 -M 1 -ddd
>   # Running 'numa/mem' benchmark:
> 
>    # Running main, "perf bench numa numa-mem -p 3 -t 1 -P 512 -s 100 -zZcm0 --thp 1 -M 1 -ddd"
>   binding to node 0, mask: 0000000000000001 => -1
>   perf: bench/numa.c:356: bind_to_memnode: Assertion `!(ret)' failed.
>   Aborted (core dumped)
> 
> This happens when the cpu0 is not part of node0,
> which is the benchmark assumption and we can see
> that's not the case for some powerpc servers.
> 
> Using correct node for cpu0 binding.

Thanks, applied to perf/urgent.

- Arnaldo
 
> Cc: Satheesh Rajendran <sathnaga@...ux.vnet.ibm.com>
> Reported-by: Michael Petlan <mpetlan@...hat.com>
> Link: http://lkml.kernel.org/n/tip-9m9j1xm3xjaa1sogvbva0o8i@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@...nel.org>
> ---
>  tools/perf/bench/numa.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c
> index a640ca7aaada..513cb2f2fa32 100644
> --- a/tools/perf/bench/numa.c
> +++ b/tools/perf/bench/numa.c
> @@ -379,8 +379,10 @@ static u8 *alloc_data(ssize_t bytes0, int map_flags,
>  
>  	/* Allocate and initialize all memory on CPU#0: */
>  	if (init_cpu0) {
> -		orig_mask = bind_to_node(0);
> -		bind_to_memnode(0);
> +		int node = numa_node_of_cpu(0);
> +
> +		orig_mask = bind_to_node(node);
> +		bind_to_memnode(node);
>  	}
>  
>  	bytes = bytes0 + HPSIZE;
> -- 
> 2.21.0

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ