Support for alternate epochs in fio log files
authoraggieNick02 <nick@pcpartpicker.com>
Tue, 14 Dec 2021 19:56:58 +0000 (13:56 -0600)
committeraggieNick02 <nick@pcpartpicker.com>
Tue, 14 Dec 2021 19:56:58 +0000 (13:56 -0600)
commitd5b3cfd4064d5414c1bce4acc65c181db86a8634
treefadab804b24b6cb57179859e70dc0d85687ed9fa
parent2ea393df3256e44398558c264f035f8db7656b08
Support for alternate epochs in fio log files

Add options log_alternate_epoch and log_alternate_epoch_clock_id. This
is similar to the log_unix_epoch option. This resolves the issue raised
in Issue #1314

log_alternate_epoch, if true, causes log files to use the same epoch
used used by the clock_id parameter to the unix clock_gettime function,
where clock_id is specified by the log_alternate_epoch_clock_id option.

This is particularly useful as it allows us to specify a clock id like
CLOCK_MONOTONIC_RAW, which is natural for synchronizing log files
between processes. The current log_unix_epoch is problematic for that
purpose because that clock is not monotonic or continuous.

It turns out that log_unix_epoch is actually equivalent to
log_alternate_epoch with log_alternate_epoch_clock_id set to
CLOCK_REALTIME=0. Since this is the default value of the
log_alternate_epoch_clock_id option anyways, we treat
log_alternate_epoch and log_unix_epoch as equivalent in functionality,
retaining the latter to avoid breaking existing clients.

Signed-off-by: Nick Neumann <nick@pcpartpicker.com>
13 files changed:
HOWTO
backend.c
cconv.c
fio.1
fio.h
fio_time.h
libfio.c
options.c
os/windows/posix.c
rate-submit.c
stat.c
thread_options.h
time.c