From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: akpm@linux-foundation.org, jbaron@akamai.com,
linux-kernel@vger.kernel.org, Davidlohr Bueso <dbueso@suse.de>
Subject: Re: [PATCH 1/2] perf-bench: Add epoll parallel epoll_wait benchmark
Date: Thu, 8 Nov 2018 10:45:00 -0300 [thread overview]
Message-ID: <20181108134500.GA15568@kernel.org> (raw)
In-Reply-To: <20181106191325.GM7077@kernel.org>
Em Tue, Nov 06, 2018 at 04:13:25PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Tue, Nov 06, 2018 at 10:23:49AM -0800, Davidlohr Bueso escreveu:
> > Mind this fixlet for using et/oneshot and the multiq option.
>
> Yes sir, applied the fixup to the first patch in the series, applied the
> second, tested, merged.
So, one of these two is making the build to fail in all the Alpine Linux
(3.4 -- 3.8 and edge) and also on some others
On Alpine the error is:
CC /tmp/build/perf/bench/futex-lock-pi.o
CC /tmp/build/perf/bench/epoll-wait.o
bench/epoll-wait.c: In function 'do_threads':
bench/epoll-wait.c:345:10: error: implicit declaration of function 'pthread_attr_setaffinity_np' [-Werror=implicit-function-declaration]
ret = pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t), &cpuset);
^
bench/epoll-wait.c:345:4: error: nested extern declaration of 'pthread_attr_setaffinity_np' [-Werror=nested-externs]
ret = pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t), &cpuset);
^
bench/epoll-wait.c: In function 'bench_epoll_wait':
bench/epoll-wait.c:462:12: error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'rlim_t {aka long long unsigned int}' [-Werror=format=]
printinfo("Setting RLIMIT_NOFILE rlimit from %lu to: %lu\n", prevrl.rlim_max, rl.rlim_max);
^
bench/epoll-wait.c:85:31: note: in definition of macro 'printinfo'
do { if (__verbose) { printf(fmt, ## arg); fflush(stdout); } } while (0)
^
bench/epoll-wait.c:462:12: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'rlim_t {aka long long unsigned int}' [-Werror=format=]
printinfo("Setting RLIMIT_NOFILE rlimit from %lu to: %lu\n", prevrl.rlim_max, rl.rlim_max);
^
bench/epoll-wait.c:85:31: note: in definition of macro 'printinfo'
do { if (__verbose) { printf(fmt, ## arg); fflush(stdout); } } while (0)
^
CC /tmp/build/perf/util/trace-event-info.o
CC /tmp/build/perf/perf.o
cc1: all warnings being treated as errors
mv: can't rename '/tmp/build/perf/bench/.epoll-wait.o.tmp': No such file or directory
/git/linux/tools/build/Makefile.build:96: recipe for target '/tmp/build/perf/bench/epoll-wait.o' failed
make[4]: *** [/tmp/build/perf/bench/epoll-wait.o] Error 1
/git/linux/tools/build/Makefile.build:139: recipe for target 'bench' failed
make[3]: *** [bench] Error 2
make[3]: *** Waiting for unfinished jobs....
CC /tmp/build/perf/util/trace-event-scripting.o
On AmazonLinux 1 and 2, oops, these are mine:
LINK /tmp/build/perf/perf
/tmp/build/perf/perf-in.o: In function `bpf_map__set_filter_pids':
/git/linux/tools/perf/builtin-trace.c:2573: undefined reference to `bpf_map(float, double)'
/tmp/build/perf/perf-in.o: In function `cmd_trace':
(.text+0x4c71e): undefined reference to `bpf_map_update_elem'
/tmp/build/perf/perf-in.o: In function `cmd_trace':
(.text+0x4cab6): undefined reference to `bpf_map(float, double)'
/tmp/build/perf/perf-in.o: In function `cmd_trace':
(.text+0x4cae8): undefined reference to `bpf_map_update_elem'
collect2: error: ld returned 1 exit status
make[2]: *** [/tmp/build/perf/perf] Error 1
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
make: Leaving directory `/git/linux/tools/perf'
[root@seventh ~]#
I need to do that conditionally, i.e. it seems libbpf is not being built
in that distro...
centos:5 is about perf bench:
CC /tmp/build/perf/bench/epoll-wait.o
bench/epoll-wait.c:74:25: error: sys/eventfd.h: No such file or directory
cc1: warnings being treated as errors
bench/epoll-wait.c: In function 'do_threads':
bench/epoll-wait.c:328: warning: implicit declaration of function 'eventfd'
bench/epoll-wait.c:328: warning: nested extern declaration of 'eventfd'
bench/epoll-wait.c:328: error: 'EFD_NONBLOCK' undeclared (first use in this function)
bench/epoll-wait.c:328: error: (Each undeclared identifier is reported only once
bench/epoll-wait.c:328: error: for each function it appears in.)
mv: cannot stat `/tmp/build/perf/bench/.epoll-wait.o.tmp': No such file or directory
make[4]: *** [/tmp/build/perf/bench/epoll-wait.o] Error 1
make[3]: *** [bench] Error 2
make[3]: *** Waiting for unfinished jobs....
MKDIR /tmp/build/perf/tests/
centos:6 and 7 are ok with perf bench, not so much with my bpf changes :-\
LINK /tmp/build/perf/libperf-gtk.so
/tmp/build/perf/perf-in.o: In function `bpf_map__set_filter_pids':
/git/linux/tools/perf/builtin-trace.c:2573: undefined reference to `bpf_map(float, double)'
/git/linux/tools/perf/builtin-trace.c:2577: undefined reference to `bpf_map_update_elem'
/git/linux/tools/perf/builtin-trace.c:2573: undefined reference to `bpf_map(float, double)'
/git/linux/tools/perf/builtin-trace.c:2577: undefined reference to `bpf_map_update_elem'
collect2: ld returned 1 exit status
make[2]: *** [/tmp/build/perf/perf] Error 1
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
make: Leaving directory `/git/linux/tools/perf'
[root@seventh ~]#
[root@seventh ~]#
- Arnaldo
> - Arnaldo
>
> > diff --git a/tools/perf/bench/epoll-wait.c b/tools/perf/bench/epoll-wait.c
> > index c4c5ef60feb4..4e4efc5cfe22 100644
> > --- a/tools/perf/bench/epoll-wait.c
> > +++ b/tools/perf/bench/epoll-wait.c
> > @@ -215,13 +215,13 @@ static void *workerfn(void *arg)
> >
> > if (et) {
> > ev.events = EPOLLIN | EPOLLET;
> > - ret = epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &ev);
> > + ret = epoll_ctl(efd, EPOLL_CTL_ADD, fd, &ev);
> > }
> >
> > if (oneshot) {
> > /* rearm the file descriptor with a new event mask */
> > ev.events |= EPOLLIN | EPOLLONESHOT;
> > - ret = epoll_ctl(epollfd, EPOLL_CTL_MOD, fd, &ev);
> > + ret = epoll_ctl(efd, EPOLL_CTL_MOD, fd, &ev);
> > }
> >
> > ops++;
> > @@ -249,7 +249,7 @@ static void nest_epollfd(struct worker *w)
> >
> > for (i = 0; i < nested; i++) {
> > epollfdp[i] = epoll_create(1);
> > - if (epollfd < 0)
> > + if (epollfdp[i] < 0)
> > err(EXIT_FAILURE, "epoll_create");
> > }
> >
next prev parent reply other threads:[~2018-11-08 13:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-06 15:22 [PATCH 0/2] perf-bench: introduce epoll benchmarks Davidlohr Bueso
2018-11-06 15:22 ` [PATCH 1/2] perf-bench: Add epoll parallel epoll_wait benchmark Davidlohr Bueso
2018-11-06 18:23 ` Davidlohr Bueso
2018-11-06 19:13 ` Arnaldo Carvalho de Melo
2018-11-08 13:45 ` Arnaldo Carvalho de Melo [this message]
2018-11-09 21:07 ` Davidlohr Bueso
2018-11-11 17:33 ` Arnaldo Carvalho de Melo
2018-11-12 5:38 ` Davidlohr Bueso
2018-11-22 7:10 ` [tip:perf/core] perf bench: Move HAVE_PTHREAD_ATTR_SETAFFINITY_NP into bench.h tip-bot for Davidlohr Bueso
2018-11-22 7:11 ` [tip:perf/core] perf bench: Add epoll parallel epoll_wait benchmark tip-bot for Davidlohr Bueso
2018-11-06 15:22 ` [PATCH 2/2] perf-bench: Add epoll_ctl(2) benchmark Davidlohr Bueso
2018-11-22 7:11 ` [tip:perf/core] perf bench: " tip-bot for Davidlohr Bueso
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=20181108134500.GA15568@kernel.org \
--to=acme@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=dave@stgolabs.net \
--cc=dbueso@suse.de \
--cc=jbaron@akamai.com \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).