Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
abt-io
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
sds
abt-io
Commits
8ae16647
Commit
8ae16647
authored
Jul 10, 2016
by
Philip Carns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
work around O_DIRECT and mkostemp
parent
b4ed21f5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
0 deletions
+28
-0
examples/abt-io-overlap.c
examples/abt-io-overlap.c
+9
-0
examples/concurrent-write-bench.c
examples/concurrent-write-bench.c
+5
-0
examples/pthread-overlap.c
examples/pthread-overlap.c
+10
-0
src/abt-io.c
src/abt-io.c
+4
-0
No files found.
examples/abt-io-overlap.c
View file @
8ae16647
...
...
@@ -13,10 +13,15 @@
#include <openssl/rand.h>
#include <errno.h>
#include "abt-io-config.h"
#include <abt.h>
#include <abt-io.h>
#include <abt-snoozer.h>
#ifndef HAVE_ODIRECT
#define O_DIRECT 0
#endif
struct
worker_ult_common
{
int
opt_io
;
...
...
@@ -244,7 +249,11 @@ static void worker_ult(void *_arg)
}
else
{
#ifdef HAVE_MKOSTEMP
fd
=
mkostemp
(
template
,
O_DIRECT
|
O_SYNC
);
#else
fd
=
mkstemp
(
template
);
#endif
if
(
fd
<
0
)
{
perror
(
"mkostemp"
);
...
...
examples/concurrent-write-bench.c
View file @
8ae16647
...
...
@@ -13,10 +13,15 @@
#include <float.h>
#include <errno.h>
#include "abt-io-config.h"
#include <abt.h>
#include <abt-io.h>
#include <abt-snoozer.h>
#ifndef HAVE_ODIRECT
#define O_DIRECT 0
#endif
/* This is a simple benchmark that measures the
* streaming, concurrent, sequentially-issued write throughput for a
* specified number of concurrent operations. It includes an abt-io version and
...
...
examples/pthread-overlap.c
View file @
8ae16647
...
...
@@ -14,6 +14,12 @@
#include <errno.h>
#include <pthread.h>
#include "abt-io-config.h"
#ifndef HAVE_ODIRECT
#define O_DIRECT 0
#endif
struct
worker_pthread_common
{
int
opt_io
;
...
...
@@ -140,7 +146,11 @@ static void *worker_pthread(void *_arg)
if
(
common
->
opt_io
)
{
#ifdef HAVE_MKOSTEMP
fd
=
mkostemp
(
template
,
O_DIRECT
|
O_SYNC
);
#else
fd
=
mkstemp
(
template
);
#endif
if
(
fd
<
0
)
{
perror
(
"mkostemp"
);
...
...
src/abt-io.c
View file @
8ae16647
...
...
@@ -297,7 +297,11 @@ static void abt_io_mkostemp_fn(void *foo)
{
struct
abt_io_mkostemp_state
*
state
=
foo
;
#ifdef HAVE_MKOSTEMP
*
state
->
ret
=
mkostemp
(
state
->
template
,
state
->
flags
);
#else
*
state
->
ret
=
mkstemp
(
state
->
template
);
#endif
if
(
*
state
->
ret
<
0
)
*
state
->
ret
=
-
errno
;
...
...
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