[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <64B99006-B94E-485E-8382-91E50244A5E4@linux.vnet.ibm.com>
Date: Tue, 12 Apr 2022 22:03:14 +0530
From: Athira Rajeev <atrajeev@...ux.vnet.ibm.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Ian Rogers <irogers@...gle.com>, maddy@...ux.vnet.ibm.com,
Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
Nageswara Sastry <rnsastry@...ux.ibm.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-perf-users@...r.kernel.org, Jiri Olsa <jolsa@...nel.org>,
kajoljain <kjain@...ux.ibm.com>, disgoel@...ux.vnet.ibm.com,
linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v2 0/4] Fix perf bench numa, futex and epoll to work with
machines having #CPUs > 1K
> On 09-Apr-2022, at 10:48 PM, Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
>
> Em Sat, Apr 09, 2022 at 12:28:01PM -0300, Arnaldo Carvalho de Melo escreveu:
>> Em Wed, Apr 06, 2022 at 11:21:09PM +0530, Athira Rajeev escreveu:
>>> The perf benchmark for collections: numa, futex and epoll
>>> hits failure in system configuration with CPU's more than 1024.
>>> These benchmarks uses "sched_getaffinity" and "sched_setaffinity"
>>> in the code to work with affinity.
>>
>> Applied 1-3, 4 needs some reworking and can wait for v5.19, the first 3
>> are fixes, so can go now.
>
> Now trying to fix this:
>
> 26 7.89 debian:9 : FAIL gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)
> bench/numa.c: In function 'alloc_data':
> bench/numa.c:359:6: error: 'orig_mask' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> ret = sched_setaffinity(0, size, mask);
> ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> bench/numa.c:409:13: note: 'orig_mask' was declared here
> cpu_set_t *orig_mask;
> ^~~~~~~~~
> cc1: all warnings being treated as errors
> /git/perf-5.18.0-rc1/tools/build/Makefile.build:139: recipe for target 'bench' failed
> make[3]: *** [bench] Error 2
>
>
> Happened in several distros.
Hi Arnaldo
Thanks for pointing it. I could be able to recreate this compile error in Debian.
The reason for this issue is variable orig_mask which is used and initialised in “alloc_data"
function within if condition for "init_cpu0”. We can fix this issue by initialising it to NULL since
it is accessed conditionally. I also made some changes to CPU_FREE the mask in other error paths.
I will post a V3 with these changes.
Athira
>
> - Arnaldo
Powered by blists - more mailing lists