* [PATCH 1/2] oslat: Remove redundant include
@ 2021-07-07 8:48 Nicolas Saenz Julienne
2021-07-07 8:48 ` [PATCH 2/2] oslat: Don't take trace_threshold into account during preheat Nicolas Saenz Julienne
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Nicolas Saenz Julienne @ 2021-07-07 8:48 UTC (permalink / raw)
To: linux-rt-users, peterx; +Cc: williams, jkacur, nsaenzju
inttypes.h is already included above.
Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
---
src/oslat/oslat.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/oslat/oslat.c b/src/oslat/oslat.c
index 6108fed..1cba6fc 100644
--- a/src/oslat/oslat.c
+++ b/src/oslat/oslat.c
@@ -29,7 +29,6 @@
#include <numa.h>
#include <math.h>
#include <limits.h>
-#include <inttypes.h>
#include <sys/prctl.h>
#include <sys/stat.h>
--
2.31.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] oslat: Don't take trace_threshold into account during preheat
2021-07-07 8:48 [PATCH 1/2] oslat: Remove redundant include Nicolas Saenz Julienne
@ 2021-07-07 8:48 ` Nicolas Saenz Julienne
2021-07-07 17:45 ` Peter Xu
2021-07-09 18:08 ` John Kacur
2021-07-07 17:44 ` [PATCH 1/2] oslat: Remove redundant include Peter Xu
2021-07-09 18:08 ` John Kacur
2 siblings, 2 replies; 8+ messages in thread
From: Nicolas Saenz Julienne @ 2021-07-07 8:48 UTC (permalink / raw)
To: linux-rt-users, peterx; +Cc: williams, jkacur, nsaenzju
The point of preheat is to make sure CPUs are out of idle and running at
max frequency by the time the real test starts. So it's expected to
incur into extra latencies we don't really mean to measure. With this in
mind, it doesn't make sense to take into account the trace threshold
during that run. So don't do it.
Note that this has been observed in practice. The threshold would be hit
during preheat but not during the real test.
Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
---
src/oslat/oslat.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/oslat/oslat.c b/src/oslat/oslat.c
index 1cba6fc..6ff5ba8 100644
--- a/src/oslat/oslat.c
+++ b/src/oslat/oslat.c
@@ -29,6 +29,7 @@
#include <numa.h>
#include <math.h>
#include <limits.h>
+#include <stdbool.h>
#include <sys/prctl.h>
#include <sys/stat.h>
@@ -150,6 +151,7 @@ struct thread {
struct global {
/* Configuration. */
unsigned int runtime_secs;
+ bool preheat;
/*
* Number of threads running for current test
* (either pre heat or real run)
@@ -299,7 +301,7 @@ static void insert_bucket(struct thread *t, stamp_t value)
us = index + 1;
assert(us > 0);
- if (g.trace_threshold && us >= g.trace_threshold) {
+ if (!g.preheat && g.trace_threshold && us >= g.trace_threshold) {
char *line = "%s: Trace threshold (%d us) triggered with %u us!\n"
"Stopping the test.\n";
tracemark(line, g.app_name, g.trace_threshold, us);
@@ -515,11 +517,12 @@ static void write_summary_json(FILE *f, void *data)
fprintf(f, " }\n");
}
-static void run_expt(struct thread *threads, int runtime_secs)
+static void run_expt(struct thread *threads, int runtime_secs, bool preheat)
{
int i;
g.runtime_secs = runtime_secs;
+ g.preheat = preheat;
g.n_threads_started = 0;
g.n_threads_running = 0;
g.n_threads_finished = 0;
@@ -846,14 +849,14 @@ int main(int argc, char *argv[])
g.n_threads = 1;
else
g.n_threads = g.n_threads_total;
- run_expt(threads, 1);
+ run_expt(threads, 1, true);
record_bias(threads);
if (!g.quiet)
printf("Test starts...\n");
/* Reset n_threads to always run on all the cores */
g.n_threads = g.n_threads_total;
- run_expt(threads, g.runtime);
+ run_expt(threads, g.runtime, false);
if (!g.quiet)
printf("Test completed.\n\n");
--
2.31.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] oslat: Remove redundant include
2021-07-07 8:48 [PATCH 1/2] oslat: Remove redundant include Nicolas Saenz Julienne
2021-07-07 8:48 ` [PATCH 2/2] oslat: Don't take trace_threshold into account during preheat Nicolas Saenz Julienne
@ 2021-07-07 17:44 ` Peter Xu
2021-07-09 18:08 ` John Kacur
2021-07-09 18:08 ` John Kacur
2 siblings, 1 reply; 8+ messages in thread
From: Peter Xu @ 2021-07-07 17:44 UTC (permalink / raw)
To: Nicolas Saenz Julienne; +Cc: linux-rt-users, williams, jkacur
On Wed, Jul 07, 2021 at 10:48:48AM +0200, Nicolas Saenz Julienne wrote:
> inttypes.h is already included above.
>
> Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
--
Peter Xu
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] oslat: Don't take trace_threshold into account during preheat
2021-07-07 8:48 ` [PATCH 2/2] oslat: Don't take trace_threshold into account during preheat Nicolas Saenz Julienne
@ 2021-07-07 17:45 ` Peter Xu
2021-07-09 18:09 ` John Kacur
2021-07-09 18:08 ` John Kacur
1 sibling, 1 reply; 8+ messages in thread
From: Peter Xu @ 2021-07-07 17:45 UTC (permalink / raw)
To: Nicolas Saenz Julienne; +Cc: linux-rt-users, williams, jkacur
On Wed, Jul 07, 2021 at 10:48:49AM +0200, Nicolas Saenz Julienne wrote:
> The point of preheat is to make sure CPUs are out of idle and running at
> max frequency by the time the real test starts. So it's expected to
> incur into extra latencies we don't really mean to measure. With this in
> mind, it doesn't make sense to take into account the trace threshold
> during that run. So don't do it.
>
> Note that this has been observed in practice. The threshold would be hit
> during preheat but not during the real test.
>
> Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
--
Peter Xu
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] oslat: Remove redundant include
2021-07-07 8:48 [PATCH 1/2] oslat: Remove redundant include Nicolas Saenz Julienne
2021-07-07 8:48 ` [PATCH 2/2] oslat: Don't take trace_threshold into account during preheat Nicolas Saenz Julienne
2021-07-07 17:44 ` [PATCH 1/2] oslat: Remove redundant include Peter Xu
@ 2021-07-09 18:08 ` John Kacur
2 siblings, 0 replies; 8+ messages in thread
From: John Kacur @ 2021-07-09 18:08 UTC (permalink / raw)
To: Nicolas Saenz Julienne; +Cc: linux-rt-users, peterx, williams
On Wed, 7 Jul 2021, Nicolas Saenz Julienne wrote:
> inttypes.h is already included above.
>
> Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
> ---
> src/oslat/oslat.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/src/oslat/oslat.c b/src/oslat/oslat.c
> index 6108fed..1cba6fc 100644
> --- a/src/oslat/oslat.c
> +++ b/src/oslat/oslat.c
> @@ -29,7 +29,6 @@
> #include <numa.h>
> #include <math.h>
> #include <limits.h>
> -#include <inttypes.h>
>
> #include <sys/prctl.h>
> #include <sys/stat.h>
> --
> 2.31.1
>
>
Signed-off-by: John Kacur <jkacur@redhat.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] oslat: Don't take trace_threshold into account during preheat
2021-07-07 8:48 ` [PATCH 2/2] oslat: Don't take trace_threshold into account during preheat Nicolas Saenz Julienne
2021-07-07 17:45 ` Peter Xu
@ 2021-07-09 18:08 ` John Kacur
1 sibling, 0 replies; 8+ messages in thread
From: John Kacur @ 2021-07-09 18:08 UTC (permalink / raw)
To: Nicolas Saenz Julienne; +Cc: linux-rt-users, peterx, williams
On Wed, 7 Jul 2021, Nicolas Saenz Julienne wrote:
> The point of preheat is to make sure CPUs are out of idle and running at
> max frequency by the time the real test starts. So it's expected to
> incur into extra latencies we don't really mean to measure. With this in
> mind, it doesn't make sense to take into account the trace threshold
> during that run. So don't do it.
>
> Note that this has been observed in practice. The threshold would be hit
> during preheat but not during the real test.
>
> Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
> ---
> src/oslat/oslat.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/src/oslat/oslat.c b/src/oslat/oslat.c
> index 1cba6fc..6ff5ba8 100644
> --- a/src/oslat/oslat.c
> +++ b/src/oslat/oslat.c
> @@ -29,6 +29,7 @@
> #include <numa.h>
> #include <math.h>
> #include <limits.h>
> +#include <stdbool.h>
>
> #include <sys/prctl.h>
> #include <sys/stat.h>
> @@ -150,6 +151,7 @@ struct thread {
> struct global {
> /* Configuration. */
> unsigned int runtime_secs;
> + bool preheat;
> /*
> * Number of threads running for current test
> * (either pre heat or real run)
> @@ -299,7 +301,7 @@ static void insert_bucket(struct thread *t, stamp_t value)
> us = index + 1;
> assert(us > 0);
>
> - if (g.trace_threshold && us >= g.trace_threshold) {
> + if (!g.preheat && g.trace_threshold && us >= g.trace_threshold) {
> char *line = "%s: Trace threshold (%d us) triggered with %u us!\n"
> "Stopping the test.\n";
> tracemark(line, g.app_name, g.trace_threshold, us);
> @@ -515,11 +517,12 @@ static void write_summary_json(FILE *f, void *data)
> fprintf(f, " }\n");
> }
>
> -static void run_expt(struct thread *threads, int runtime_secs)
> +static void run_expt(struct thread *threads, int runtime_secs, bool preheat)
> {
> int i;
>
> g.runtime_secs = runtime_secs;
> + g.preheat = preheat;
> g.n_threads_started = 0;
> g.n_threads_running = 0;
> g.n_threads_finished = 0;
> @@ -846,14 +849,14 @@ int main(int argc, char *argv[])
> g.n_threads = 1;
> else
> g.n_threads = g.n_threads_total;
> - run_expt(threads, 1);
> + run_expt(threads, 1, true);
> record_bias(threads);
>
> if (!g.quiet)
> printf("Test starts...\n");
> /* Reset n_threads to always run on all the cores */
> g.n_threads = g.n_threads_total;
> - run_expt(threads, g.runtime);
> + run_expt(threads, g.runtime, false);
>
> if (!g.quiet)
> printf("Test completed.\n\n");
> --
> 2.31.1
>
>
Signed-off-by: John Kacur <jkacur@redhat.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] oslat: Remove redundant include
2021-07-07 17:44 ` [PATCH 1/2] oslat: Remove redundant include Peter Xu
@ 2021-07-09 18:08 ` John Kacur
0 siblings, 0 replies; 8+ messages in thread
From: John Kacur @ 2021-07-09 18:08 UTC (permalink / raw)
To: Peter Xu; +Cc: Nicolas Saenz Julienne, linux-rt-users, williams
On Wed, 7 Jul 2021, Peter Xu wrote:
> On Wed, Jul 07, 2021 at 10:48:48AM +0200, Nicolas Saenz Julienne wrote:
> > inttypes.h is already included above.
> >
> > Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
>
> Reviewed-by: Peter Xu <peterx@redhat.com>
>
> --
> Peter Xu
>
>
Thanks, added
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] oslat: Don't take trace_threshold into account during preheat
2021-07-07 17:45 ` Peter Xu
@ 2021-07-09 18:09 ` John Kacur
0 siblings, 0 replies; 8+ messages in thread
From: John Kacur @ 2021-07-09 18:09 UTC (permalink / raw)
To: Peter Xu; +Cc: Nicolas Saenz Julienne, linux-rt-users, williams
On Wed, 7 Jul 2021, Peter Xu wrote:
> On Wed, Jul 07, 2021 at 10:48:49AM +0200, Nicolas Saenz Julienne wrote:
> > The point of preheat is to make sure CPUs are out of idle and running at
> > max frequency by the time the real test starts. So it's expected to
> > incur into extra latencies we don't really mean to measure. With this in
> > mind, it doesn't make sense to take into account the trace threshold
> > during that run. So don't do it.
> >
> > Note that this has been observed in practice. The threshold would be hit
> > during preheat but not during the real test.
> >
> > Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
>
> Reviewed-by: Peter Xu <peterx@redhat.com>
>
> --
> Peter Xu
>
>
Thanks, added
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-07-09 18:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07 8:48 [PATCH 1/2] oslat: Remove redundant include Nicolas Saenz Julienne
2021-07-07 8:48 ` [PATCH 2/2] oslat: Don't take trace_threshold into account during preheat Nicolas Saenz Julienne
2021-07-07 17:45 ` Peter Xu
2021-07-09 18:09 ` John Kacur
2021-07-09 18:08 ` John Kacur
2021-07-07 17:44 ` [PATCH 1/2] oslat: Remove redundant include Peter Xu
2021-07-09 18:08 ` John Kacur
2021-07-09 18:08 ` John Kacur
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.