forked from filebench/filebench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README_COND_COMP
236 lines (146 loc) · 5.62 KB
/
README_COND_COMP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
This file contains the list of constants, depending on which the source is
compiled. Notice that 'config.in' template has a greater number of these
constants, because Autoconfig generates some of them "automatically", despite
the fact that we dont use it.
Here we have the list of constants used by Filebench's code only. There might
be different constants used in the included system headers (which vary from one
target machine to another). We assume it is OK, but we keep in mind that it can
be a potential problem.
The list is important for checking that compilations on all target platforms
happens identically, to ensure the validity of benchmark results' comparison.
The list below must be mantained in alphabetic orded.
HAVE_AIO
We know that librt with aio_write() and consequently aio_return()
functions is installed on the system. In this case aiowrite
and aiowait flowops become available.
HAVE_AIO_ERROR64
On FreeBSD function aio_error64() is not available. So we
use the aio_error() instead.
HAVE_AIO_RETURN64
On FreeBSD function aio_return64() is not available. So we
use the aio_return() instead.
HAVE_AIO_WRITE64
On FreeBSD function aio_write64() is not available. So we
use the aio_write() instead. This is also used for defining
aiocb64 if necessary. We do not do a separate check
for this type.
HAVE_AIOCB64_T
We check if struct aiocb64 is available. If not (FreeBSD), then
typedef it just as aiocb.
HAVE_AIOWAITN
We know that librt with aio_waitn() function is installed on the system
(typically on Solaris). Filebench uses it instead of aio_return() to wait
for the aio completion.
_BIG_ENDIAN
Used to correctly initialize erand48() seed.
HAVE_BOOLEAN_T
On OpenSolaris we have boolean_t. Detect it and don't redefine boolean_t
type in this case.
HAVE_CFTIME
cftime() function is obsoleted by strftime. Still we use it, if it
is available.
HAVE_DIRECTIO
Solaris has a special system call directio() to specify
that IO should happen in the direct manner. This is
the equivalent of O_DIRECT on linux. Use directio()
if available, otherwise O_DIRECT.
HAVE_FADVISE
FreeBSD doesn't have posix_fadvise(). Just not
use it at all with printing the warning in this case.
HAVE_FSTAT64
On FreeBSD function fstat64() is not available. So we
use the fstat() instead.
HAVE_FORK
Without fork() Filebench won't be able to fork any workers!
HAVE_FORK1
User fork1(), if available (Solaris). fork1() forks only
current thread (fork() on some implementations of Solaris
forks all threads in the process!)
HAVE_FTRUNCATE64
Use ftruncate64() if possible. Otherwise, we use ftruncate()
converting off64_t to off_t, which might be a possible
problem.
HAVE_GETHRTIME
If gethrtime() function is not available (which is
only available on Solaris) use regular gettimeofdate().
HAVE_LSEEK64
On FreeBSD function lseek64() is not available. So we
use the lseek() instead.
HAVE_LIBTECLA
If libtecla library is installed, use it for facilitating
auto-completion.
HAVE_LWPS
On Solaris _lwp_self() function might be available, that
returns the id of the current thread. Use it, if possible, but only
for printing additional log information.
HAVE_MMAP64
On FreeBSD function mmap64() is not available. So we
use the refular mmap64() instead.
HAVE_OFF64_T
On FreeBSD off64_t is not available. off_t is already 64 bit.
We define off64_t as off_t in this case.
HAVE_OPEN64
On FreeBSD function open64() is not available. So we
use the refular open() instead.
HAVE_PROCSCOPE_PTHREADS
If you have POSIX process scope threads, use them.
HAVE_PROC_SYS_KERNEL_SHMMAX
We increase the maximum size of a shared memory segment through
/proc/sys/kernel/shmmax, if this file exists.
HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL
Use POSIX setprotocol if available.
HAVE_PWRITE64
On FreeBSD function pwrite64() is not available.
So we use refular pwrite() instead.
HAVE_PREAD64
On FreeBSD function pread64() is not available.
So we use refular pread() instead.
HAVE_ROBUST_MUTEX
Use robust mutexes if available.
HAVE_SEMTIMEDOP
If you have the `semtimedop' function.
HAVE_SEM_RMID
If semctl() has IPC_RMID control, use it.
HAVE_SETRLIMIT
We set the limit of opened files per process to
maximum if set/getrlimit functions are availble
HAVE_SHM_SHARE_MMU
SHM_SHARE_MMU flag for shmat() is defined on Solaris.
Use it, if possible.
HAVE_SIGIGNORE
On FreeBSD sigignore is not available, so we emulate
it via sigaction()
HAVE_SIGSEND
Solaris has sigsend() syscall that allows to
specify more precisely the enity to which the
signal is send (process, process group, session, etc.
Use it if available instead of the kill().
HAVE_STAT64
On FreeBSD function stat64() and struct stat64 are not available.
So we use refular stat() and struct stat instead.
HAVE_STDINT_H
Include <stdint.h> if it is available.
HAVE_STRLCAT
If we have strlcat() function, use it, otherwise implement
it by ourselves.
HAVE_STRLCPY
If we have strlcpy() function, use it, otherwise implement
it by ourselves
HAVE_SYSV_SEM
Use SYSV semaphores instead POSIX semaphores if possible.
HAVE_WAITID
FreeBSD doesn't have waitid() system call. Emulate it
via waitpid().
_LP64
Used (together with __WORDSIZE) to determine if atchitecture
is 64 bit and implement AVL tree more effectively.
__STDC__
Used only to figure out how to handle functions with
variable number of arguments (filebench_log()).
USE_SYSTEM
Allows to use system() function instead of execlp() to
run external program. Enabled by configure with --enable-system
parameter.
__WORDSIZE
Used (together with _LP64) to determine if atchitecture
is 64 bit and implement AVL tree more effectively.