Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sds
abt-io
Commits
a701728f
Commit
a701728f
authored
Jun 02, 2020
by
Philip Carns
Browse files
fadvise calls
parent
6ee91666
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/concurrent-write-bench.c
View file @
a701728f
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment