aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFengguang Wu <fengguang.wu@intel.com>2018-12-18 19:24:03 +0800
committerFengguang Wu <fengguang.wu@intel.com>2018-12-18 19:24:03 +0800
commit7350ec835526b6f7a98b72aaedd7ef38082ab3a1 (patch)
treee9432868314111007f5b4e51241b464d5fbd17b1
parentf9bbfa8ea722559f2fac4c2b14057c6a58658d70 (diff)
downloadvm-scalability-7350ec835526b6f7a98b72aaedd7ef38082ab3a1.tar.gz
Revert "Avoid memory allocation/sync time when calculate throughput"
This reverts commit fe0353b13482d879c48d3841d15457a0fd5eca2c.
-rw-r--r--usemem.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/usemem.c b/usemem.c
index b47472d..07e23dc 100644
--- a/usemem.c
+++ b/usemem.c
@@ -73,8 +73,7 @@ unsigned long *prealloc;
unsigned long *buffer;
int sleep_secs = 0;
time_t runtime_secs = 0;
-__thread struct timeval start_time;
-__thread int started = 0;
+struct timeval start_time;
int reps = 1;
int do_mlock = 0;
int do_getchar = 0;
@@ -544,12 +543,6 @@ unsigned long do_unit(unsigned long bytes, struct drand48_data *rand_data,
if (opt_sync_rw)
ready(start_ready_fds, start_wake_fds);
- if (!started) {
- /* Avoid timing memory allocation and syncing */
- gettimeofday(&start_time, NULL);
- started = 1;
- }
-
if (opt_write_signal_read)
buffer = p;