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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu,  3 Jan 2019 16:00:29 +0100
From:   Roman Penyaev <rpenyaev@...e.de>
To:     unlisted-recipients:; (no To-header on input)
Cc:     Roman Penyaev <rpenyaev@...e.de>,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Davidlohr Bueso <dbueso@...e.de>,
        Jason Baron <jbaron@...mai.com>, linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] perf bench: rename epoll-wait bench to epoll-wait-1pmc

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@...e.de>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Davidlohr Bueso <dbueso@...e.de>
Cc: Jason Baron <jbaron@...mai.com>
Cc: linux-kernel@...r.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ