Commit a701728f authored by Philip Carns's avatar Philip Carns
Browse files

fadvise calls

parent 6ee91666
......@@ -185,6 +185,10 @@ static void abt_bench(int buffer_per_thread, unsigned int concurrency, size_t si
}
ret = fallocate(fd, 0, 0, 10737418240UL);
assert(ret == 0);
ret = posix_fadvise(fd, 0, 10737418240UL, POSIX_FADV_DONTNEED);
assert(ret == 0);
ret = posix_fadvise(fd, 0, 10737418240UL, POSIX_FADV_SEQUENTIAL);
assert(ret == 0);
tid_array = malloc(concurrency * sizeof(*tid_array));
assert(tid_array);
......@@ -304,6 +308,10 @@ static void abt_bench_nb(int buffer_per_thread, unsigned int concurrency, size_t
}
ret = fallocate(fd, 0, 0, 10737418240UL);
assert(ret == 0);
ret = posix_fadvise(fd, 0, 10737418240UL, POSIX_FADV_DONTNEED);
assert(ret == 0);
ret = posix_fadvise(fd, 0, 10737418240UL, POSIX_FADV_SEQUENTIAL);
assert(ret == 0);
/* initialize abt_io */
/* NOTE: for now we are going to use the same number of execution streams
......@@ -396,6 +404,10 @@ static void pthread_bench(int buffer_per_thread, unsigned int concurrency, size_
}
ret = fallocate(fd, 0, 0, 10737418240UL);
assert(ret == 0);
ret = posix_fadvise(fd, 0, 10737418240UL, POSIX_FADV_DONTNEED);
assert(ret == 0);
ret = posix_fadvise(fd, 0, 10737418240UL, POSIX_FADV_SEQUENTIAL);
assert(ret == 0);
id_array = malloc(concurrency * sizeof(*id_array));
assert(id_array);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment