lkml.org 
[lkml]   [2019]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] perf bench: rename epoll-wait bench to epoll-wait-1pmc
Date
I want to rename this in order to add another epoll-wait bench in next
patch and to stress in the name, that the bench corresponds to 1 producer
and many consumers.

In the following patch I plan to add epoll-wait-mp1c bench.

Signed-off-by: Roman Penyaev <rpenyaev@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: Jason Baron <jbaron@akamai.com>
Cc: linux-kernel@vger.kernel.org
---
tools/perf/bench/Build | 2 +-
tools/perf/bench/bench.h | 2 +-
tools/perf/bench/{epoll-wait.c => epoll-wait-1pmc.c} | 6 +++++-
tools/perf/builtin-bench.c | 2 +-
4 files changed, 8 insertions(+), 4 deletions(-)
rename tools/perf/bench/{epoll-wait.c => epoll-wait-1pmc.c} (98%)

diff --git a/tools/perf/bench/Build b/tools/perf/bench/Build
index e4e321b6f883..ef07fc40bc35 100644
--- a/tools/perf/bench/Build
+++ b/tools/perf/bench/Build
@@ -7,7 +7,7 @@ perf-y += futex-wake-parallel.o
perf-y += futex-requeue.o
perf-y += futex-lock-pi.o

-perf-y += epoll-wait.o
+perf-y += epoll-wait-1pmc.o
perf-y += epoll-ctl.o

perf-$(CONFIG_X86_64) += mem-memcpy-x86-64-lib.o
diff --git a/tools/perf/bench/bench.h b/tools/perf/bench/bench.h
index fddb3ced9db6..fb9782624644 100644
--- a/tools/perf/bench/bench.h
+++ b/tools/perf/bench/bench.h
@@ -38,7 +38,7 @@ int bench_futex_requeue(int argc, const char **argv);
/* pi futexes */
int bench_futex_lock_pi(int argc, const char **argv);

-int bench_epoll_wait(int argc, const char **argv);
+int bench_epoll_wait_1pmc(int argc, const char **argv);
int bench_epoll_ctl(int argc, const char **argv);

#define BENCH_FORMAT_DEFAULT_STR "default"
diff --git a/tools/perf/bench/epoll-wait.c b/tools/perf/bench/epoll-wait-1pmc.c
similarity index 98%
rename from tools/perf/bench/epoll-wait.c
rename to tools/perf/bench/epoll-wait-1pmc.c
index 5a11534e96a0..1b88cdd2ef78 100644
--- a/tools/perf/bench/epoll-wait.c
+++ b/tools/perf/bench/epoll-wait-1pmc.c
@@ -26,6 +26,10 @@
* [queue D] ---> [worker]
* [queue E] ---> [worker]
*
+ * Both models correspond to 1 producer and many consumers, where a single
+ * producer is a writer thread and consumers are many workers threads
+ * waiting for events.
+ *
* Naturally, the single queue will enforce more concurrency on the epoll
* instance, and can therefore scale poorly compared to multiple queues.
* However, this is a benchmark raw data and must be taken with a grain of
@@ -409,7 +413,7 @@ static int cmpworker(const void *p1, const void *p2)
return w1->tid > w2->tid;
}

-int bench_epoll_wait(int argc, const char **argv)
+int bench_epoll_wait_1pmc(int argc, const char **argv)
{
int ret = 0;
struct sigaction act;
diff --git a/tools/perf/builtin-bench.c b/tools/perf/builtin-bench.c
index 334c77ffc1d9..6926b5a5eebf 100644
--- a/tools/perf/builtin-bench.c
+++ b/tools/perf/builtin-bench.c
@@ -70,7 +70,7 @@ static struct bench futex_benchmarks[] = {

#ifdef HAVE_EVENTFD
static struct bench epoll_benchmarks[] = {
- { "wait", "Benchmark epoll concurrent epoll_waits", bench_epoll_wait },
+ { "wait-1pmc", "Benchmark epoll concurrent epoll_waits", bench_epoll_wait_1pmc },
{ "ctl", "Benchmark epoll concurrent epoll_ctls", bench_epoll_ctl },
{ "all", "Run all futex benchmarks", NULL },
{ NULL, NULL, NULL }
--
2.19.1
\
 
 \ /
  Last update: 2019-01-03 16:01    [W:0.046 / U:1.472 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site