fio.git
7 years agoAdd completion percentiles to results output
Jens Axboe [Mon, 5 Mar 2012 15:43:49 +0000 (16:43 +0100)]
Add completion percentiles to results output

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoEnd results fixes
Jens Axboe [Mon, 5 Mar 2012 13:37:38 +0000 (14:37 +0100)]
End results fixes

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agogfio: start of proper end results data display
Jens Axboe [Mon, 5 Mar 2012 13:09:03 +0000 (14:09 +0100)]
gfio: start of proper end results data display

Incomplete, it's just a start.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agostat: move calc of latencies into show function
Jens Axboe [Mon, 5 Mar 2012 13:08:34 +0000 (14:08 +0100)]
stat: move calc of latencies into show function

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoAdd client references
Jens Axboe [Mon, 5 Mar 2012 12:32:47 +0000 (13:32 +0100)]
Add client references

We have a use-after-free in the fio_handle_clients() loop.
If we receive a QUIT command, we remove the client in
fio_handle_client(). But fio_handle_clients() doesn't
have a way to detect this, so it checks client->error
after it has potentially been freed.

Add a simple reference to get rid of this problem.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoUnify cli latency display
Jens Axboe [Mon, 5 Mar 2012 12:08:51 +0000 (13:08 +0100)]
Unify cli latency display

And export usec_to_msec().

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoPass in client for thread/group status op
Jens Axboe [Mon, 5 Mar 2012 08:21:12 +0000 (09:21 +0100)]
Pass in client for thread/group status op

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoStore specific client ops in the fio_client structure
Jens Axboe [Sun, 4 Mar 2012 14:15:08 +0000 (15:15 +0100)]
Store specific client ops in the fio_client structure

We could be handling a mix of gui and cli clients from the server,
so passing. Plus this is a lot cleaner.

Also unify ETA opcode handling between clients.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoConvert net commands in the generic command handler
Jens Axboe [Sat, 3 Mar 2012 19:35:50 +0000 (20:35 +0100)]
Convert net commands in the generic command handler

Removes this from the cli/gui client, it can be handled
generically.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoAdd new net command for text logging
Jens Axboe [Sat, 3 Mar 2012 19:28:07 +0000 (20:28 +0100)]
Add new net command for text logging

Encapsulate the text in a payload, that also includes the
logging level and the time the event took place. The text
client will do as it always has done, but the gui client
can now do proper logging and knows if this is debug/info
or error messages.

No functional change in the GUI.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoAdd preferences help tooltips
Jens Axboe [Fri, 2 Mar 2012 18:44:15 +0000 (19:44 +0100)]
Add preferences help tooltips

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoAdd Preferences dialog
Jens Axboe [Fri, 2 Mar 2012 18:34:13 +0000 (19:34 +0100)]
Add Preferences dialog

Allows you to set debug options for the client.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoGUI fixes
Jens Axboe [Fri, 2 Mar 2012 18:09:31 +0000 (19:09 +0100)]
GUI fixes

- Don't use clear_ui_info() on normal quit
- Remove setting of all debug flags

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoStart of support for auto-starting the backend
Jens Axboe [Fri, 2 Mar 2012 13:27:17 +0000 (14:27 +0100)]
Start of support for auto-starting the backend

When running fio as a client only, you need the backend running
on the system. Start adding support for letting gfio auto-fork
the backend, if it isn't already running.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoClear UI/progress bar on disconnect/quit
Jens Axboe [Fri, 2 Mar 2012 13:04:30 +0000 (14:04 +0100)]
Clear UI/progress bar on disconnect/quit

And ensure that server idle loop sends run command once per
idle loop entry.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoTerminate clients when 'Disconnect' is clicked
Jens Axboe [Fri, 2 Mar 2012 12:32:04 +0000 (13:32 +0100)]
Terminate clients when 'Disconnect' is clicked

And reports errors in error bar.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoMove connection details to separate dialog box
Jens Axboe [Fri, 2 Mar 2012 12:12:04 +0000 (13:12 +0100)]
Move connection details to separate dialog box

No need to view that in the main window, we need the space.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoAdd support for client timed out ops
Jens Axboe [Fri, 2 Mar 2012 11:14:40 +0000 (12:14 +0100)]
Add support for client timed out ops

Just opens a dialog window.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoDon't update CR fields
Jens Axboe [Fri, 2 Mar 2012 10:21:13 +0000 (11:21 +0100)]
Don't update CR fields

They have been disabled for now.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoAdd more job info
Jens Axboe [Fri, 2 Mar 2012 09:25:24 +0000 (10:25 +0100)]
Add more job info

Adds a specific command to be sent when a job is received by
the backend. Helps fill out the GUI fields for job values.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoMore gui changes
Jens Axboe [Thu, 1 Mar 2012 11:01:29 +0000 (12:01 +0100)]
More gui changes

- Move progress bar into connect/start field
- Pretty up port/type boxes
- Hook better into adding clients
- Add ->quit hook for client ops
- Ensure fio_handle_clients() stays connected for GUI clients
- Stop server from repeatedly sending RUN commands

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agogfio: fix error handling in send_job_files()
Jens Axboe [Thu, 1 Mar 2012 07:01:52 +0000 (08:01 +0100)]
gfio: fix error handling in send_job_files()

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoUpdate GUI to attempt to graphically handle ETA output
Jens Axboe [Wed, 29 Feb 2012 12:45:02 +0000 (13:45 +0100)]
Update GUI to attempt to graphically handle ETA output

The whole layout will probably be changed, but for now it
demonstrates how to properly integrate with the net client
to handle the data and output it.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoAdd GUI probe support
Jens Axboe [Wed, 29 Feb 2012 10:44:53 +0000 (11:44 +0100)]
Add GUI probe support

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoMove client structure into client.h
Jens Axboe [Wed, 29 Feb 2012 10:44:34 +0000 (11:44 +0100)]
Move client structure into client.h

GUI will need it.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoVarious GUI updates
Jens Axboe [Wed, 29 Feb 2012 10:16:52 +0000 (11:16 +0100)]
Various GUI updates

- Add File menu, move job file to File -> Open
- Kill Quit button, move to File -> Quit
- Move client setup and load closer to what we want
- Use c99 style for client ops

Various little changes.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoRename job files
Jens Axboe [Wed, 29 Feb 2012 09:47:29 +0000 (10:47 +0100)]
Rename job files

The GUI would prefer job files to have a fixed extensions,
makes it much easier to navigate. So hence forth all fio
job files shall be named foo.fio.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoMerge branch 'master' into gfio
Jens Axboe [Wed, 29 Feb 2012 09:15:51 +0000 (10:15 +0100)]
Merge branch 'master' into gfio

We need the crc function namespace change.

7 years agoRename crc functions to private namespace
Jens Axboe [Wed, 29 Feb 2012 09:01:34 +0000 (10:01 +0100)]
Rename crc functions to private namespace

Apparently we overlap with some gtk (?) crc32() functions, causing
ours to be called and subsequently crashing since the arguments
aren't the same.

Move everything to a fio_ protected namespace.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoFio 2.0.5 fio-2.0.5
Jens Axboe [Tue, 28 Feb 2012 07:23:23 +0000 (08:23 +0100)]
Fio 2.0.5

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoReally fix IOPS logging
Jens Axboe [Tue, 28 Feb 2012 07:20:26 +0000 (08:20 +0100)]
Really fix IOPS logging

Commit 9602d8df had a bug where it mistakenly stored
the bytes last seen when doing an IOPS log entry, instead
of the blocks last seen.

Reported-by: Bill Hooper <whooper@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoFix Makefile for gfio build
Jens Axboe [Fri, 24 Feb 2012 12:11:35 +0000 (13:11 +0100)]
Fix Makefile for gfio build

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoMove init code info libfio.c
Jens Axboe [Fri, 24 Feb 2012 11:51:31 +0000 (12:51 +0100)]
Move init code info libfio.c

Kill off endian_check.{c,h} and fio_initialization.{c,h}

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoFio 2.0.4 fio-2.0.4
Jens Axboe [Fri, 24 Feb 2012 09:16:46 +0000 (10:16 +0100)]
Fio 2.0.4

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoMerge branch 'master' into gfio
Jens Axboe [Fri, 24 Feb 2012 07:28:55 +0000 (08:28 +0100)]
Merge branch 'master' into gfio

7 years agoFix verify
Jens Axboe [Fri, 24 Feb 2012 07:26:57 +0000 (08:26 +0100)]
Fix verify

The hole commit from yesterday (d3a173a9) had a bug, where
we would checksum too much.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agofio: work on textview alignment
Stephen M. Cameron [Fri, 24 Feb 2012 07:17:32 +0000 (08:17 +0100)]
fio: work on textview alignment

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agofio: work on widget alignment
Stephen M. Cameron [Fri, 24 Feb 2012 07:17:32 +0000 (08:17 +0100)]
fio: work on widget alignment

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agofio: make gui capture text ops
Stephen M. Cameron [Fri, 24 Feb 2012 07:17:32 +0000 (08:17 +0100)]
fio: make gui capture text ops

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agofio: construct options from gui
Stephen M. Cameron [Fri, 24 Feb 2012 07:17:32 +0000 (08:17 +0100)]
fio: construct options from gui

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agofio: add job file to gui temporarily
Stephen M. Cameron [Fri, 24 Feb 2012 07:17:31 +0000 (08:17 +0100)]
fio: add job file to gui temporarily

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agofio: add hostname, port, and address type (ipv4, ipv6, or socket) to gui
Stephen M. Cameron [Fri, 24 Feb 2012 07:17:31 +0000 (08:17 +0100)]
fio: add hostname, port, and address type (ipv4, ipv6, or socket) to gui

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agofio: factor out FIO_NET_PORT
Stephen M. Cameron [Fri, 24 Feb 2012 07:17:31 +0000 (08:17 +0100)]
fio: factor out FIO_NET_PORT

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agofio: Use a progress bar instead of a label
Stephen M. Cameron [Fri, 24 Feb 2012 07:17:31 +0000 (08:17 +0100)]
fio: Use a progress bar instead of a label

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agofio: make gui status update in timely fashion
Stephen M. Cameron [Fri, 24 Feb 2012 07:17:31 +0000 (08:17 +0100)]
fio: make gui status update in timely fashion

Needs inexplicable special gtk/gdk magic code for some reason.
(Learned this by hard won experience on Word War vi.)

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agofio: make the gui display thread status
Stephen M. Cameron [Fri, 24 Feb 2012 07:17:31 +0000 (08:17 +0100)]
fio: make the gui display thread status

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agofio: capture thread status display
Stephen M. Cameron [Fri, 24 Feb 2012 07:17:31 +0000 (08:17 +0100)]
fio: capture thread status display

The thread status display uses printf to stdout.
Need a way to capture it for the gui.

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agofio: make gui actually do something
Stephen M. Cameron [Fri, 24 Feb 2012 07:17:31 +0000 (08:17 +0100)]
fio: make gui actually do something

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agofio: add placeholder gui client ops
Stephen M. Cameron [Fri, 24 Feb 2012 07:17:31 +0000 (08:17 +0100)]
fio: add placeholder gui client ops

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agofio: link fio code with gui code
Stephen M. Cameron [Fri, 24 Feb 2012 07:17:31 +0000 (08:17 +0100)]
fio: link fio code with gui code

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agofio: factor out fio initialization code
Stephen M. Cameron [Fri, 24 Feb 2012 07:17:31 +0000 (08:17 +0100)]
fio: factor out fio initialization code

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agofio: factor out endian_check
Stephen M. Cameron [Fri, 24 Feb 2012 07:17:31 +0000 (08:17 +0100)]
fio: factor out endian_check

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agofio: add send job and quit buttons to gui
Stephen M. Cameron [Fri, 24 Feb 2012 07:17:30 +0000 (08:17 +0100)]
fio: add send job and quit buttons to gui

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agofio: add minimal gui program
Stephen M. Cameron [Fri, 24 Feb 2012 07:17:30 +0000 (08:17 +0100)]
fio: add minimal gui program

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agofio: make client operations pluggable
Stephen M. Cameron [Fri, 24 Feb 2012 07:17:30 +0000 (08:17 +0100)]
fio: make client operations pluggable

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoclient: exit if no jobs were sent and client is idle
Jens Axboe [Thu, 23 Feb 2012 19:56:12 +0000 (20:56 +0100)]
client: exit if no jobs were sent and client is idle

If we invoke the client without arguments, it gets the probe
response and then waits for further response from the server.
But if no command line or job files were sent, the server
is idle. In that case, just quit.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoverify: put all header verification in one place
Jens Axboe [Thu, 23 Feb 2012 09:31:07 +0000 (10:31 +0100)]
verify: put all header verification in one place

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoFix // comment
Jens Axboe [Thu, 23 Feb 2012 07:35:04 +0000 (08:35 +0100)]
Fix // comment

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoRemove holes in verify_header structure
Jens Axboe [Thu, 23 Feb 2012 07:23:18 +0000 (08:23 +0100)]
Remove holes in verify_header structure

Shrink the magic and verify_type members, and reorder so that
it packs nicely. Incompatible change, write workloads must be
re-run.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoImplement sigaction for Windows.
Bruce Cran [Wed, 22 Feb 2012 19:56:22 +0000 (19:56 +0000)]
Implement sigaction for Windows.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agostat() doesn't work with devices on Windows, so move check for '\\.\' earlier.
Bruce Cran [Wed, 22 Feb 2012 17:55:16 +0000 (17:55 +0000)]
stat() doesn't work with devices on Windows, so move check for '\\.\' earlier.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoUse crc32c for the verify_header checksum
Jens Axboe [Wed, 22 Feb 2012 19:29:42 +0000 (20:29 +0100)]
Use crc32c for the verify_header checksum

It's the only hardware assisted crypto we have, and it's
widely available in any recent Intel CPU.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoAuto-detect whether to use hw assisted crc32c
Jens Axboe [Wed, 22 Feb 2012 19:28:17 +0000 (20:28 +0100)]
Auto-detect whether to use hw assisted crc32c

Little point in separating the two. If the hardware assisted
crypto is available, always use it.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoAdd checksum to verify_header
Jens Axboe [Wed, 22 Feb 2012 19:11:57 +0000 (20:11 +0100)]
Add checksum to verify_header

Currently we don't know if the verify_header itself is
valid when pulled off a disk. While it will fail verify
if it is, fio might then confuse the 'expected' and
'received' data since it re-generates the corrupted
crc with the seed stored. But if the seed is corrupt,
then we fail.

So checksum the verify header, so that we know for a fact
whether the header is valid or not.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoflow: Fixing uninitialized variable
Daniel Ehrenberg [Wed, 22 Feb 2012 10:48:19 +0000 (11:48 +0100)]
flow: Fixing uninitialized variable

In the flow initialization code path, there was an uninitialized
variable that led to memory corruption in certain cases. This
patch should initialize the variable properly.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoFix tabbing and comment characters in Windows code.
Bruce Cran [Mon, 20 Feb 2012 20:03:48 +0000 (21:03 +0100)]
Fix tabbing and comment characters in Windows code.

Update syslog.h with proper flag values.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoRemove unused Windows version.h and version.rc files.
Bruce Cran [Mon, 20 Feb 2012 20:01:50 +0000 (21:01 +0100)]
Remove unused Windows version.h and version.rc files.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoAdd missing os/windows/posix.c file.
Bruce Cran [Mon, 20 Feb 2012 19:28:39 +0000 (19:28 +0000)]
Add missing os/windows/posix.c file.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoFix IOPS logging for mixed read/write workloads
Jens Axboe [Mon, 20 Feb 2012 19:19:28 +0000 (20:19 +0100)]
Fix IOPS logging for mixed read/write workloads

Similar to commit 5daa4ebe, but for the IOPS logging.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoMove Windows port to MinGW
Bruce Cran [Mon, 20 Feb 2012 19:18:19 +0000 (20:18 +0100)]
Move Windows port to MinGW

- Add calls to WSAStartup in the network code as required by
  Winsock.
- Add Windows-specific init_random_state function which uses the
  Crypto API.
- Move Windows port to MinGW and update build system to create a
  64-bit binary by default.
- Install text files as .rtf so they won't open in Notepad by default
  (Wordpad understands Unix line endings; Notepad doesn't).
- Simplify WiX installer code.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoAdd FIO_PREFERRED_CLOCK_SOURCE to allow selection of clock source on a per-platform...
Bruce Cran [Mon, 20 Feb 2012 17:07:32 +0000 (17:07 +0000)]
Add FIO_PREFERRED_CLOCK_SOURCE to allow selection of clock source on a per-platform basis.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoAdd OS_PATH_SEPARATOR for platforms which have different path separator characters...
Bruce Cran [Mon, 20 Feb 2012 17:01:46 +0000 (17:01 +0000)]
Add OS_PATH_SEPARATOR for platforms which have different path separator characters (e.g. Windows and 'classic' MacOS).

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoToken-based flow control
Dan Ehrenberg [Mon, 20 Feb 2012 10:05:14 +0000 (11:05 +0100)]
Token-based flow control

This patch allows two fio jobs to be kept to a certain
proportion of each other using token-based flow control.
There are three new parameters: flow, flow_watermark, and
flow_sleep, documented in the fio options. An example of an fio
job using these parameters is below:

[global]
norandommap
thread
time_based
runtime=30
direct=1
ioengine=libaio
iodepth=256
size=100g
bs=8k
filename=/tmp/testfile
flow_watermark=100
flow_sleep=1000

[job2]
numjobs=1
rw=write
flow=-8

[job1]
numjobs=1
rw=randread
flow=1

The motivating application of this patch was to allow random reads
and sequential writes at a particular given proportion.

This initial version is only correct when run with 'thread', as shared
state is represented with a global variable. It also only allows two
jobs to be synchronized properly. A future version might do more, but
no more functionality was needed for my application.

Tested: Ran a few fio jobs with this flow control, observing
the proportion of IOPS to match what was intended by the job file.
Varied the flow_watermark and flow_sleep parameters and observed
the effect on throughput.

Signed-off-by: Dan Ehrenberg <dehrenberg@google.com>
Modified by me to support flow_id, so an arbitrary number of flows can
be used. This means it no longer relies on global context, so it can be
used from a thread or process alike. Also added man page documentation.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoFix bandwidth logging for mixed read/write workloads.
Josh Carter [Mon, 20 Feb 2012 09:12:22 +0000 (10:12 +0100)]
Fix bandwidth logging for mixed read/write workloads.

fio was maintaining separate read/write stats, but only one timer for
bw_avg_time. Whichever IO direction happened to cross the timer would
get its interval logged; the other data direction would not. Now both
ddir are logged each time we cross bw_avg_time.

Where intervals don't contain any activity in a given ddir, no log
entry is made.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoFix assumption that pointers fits in a 'long'
Bruce Cran [Mon, 20 Feb 2012 08:34:24 +0000 (09:34 +0100)]
Fix assumption that pointers fits in a 'long'

Windows uses LLP64 model so [u]intptr_t is more correct.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoNeed glibc 2.8 or bigger for fallocate
Jens Axboe [Mon, 20 Feb 2012 08:21:45 +0000 (09:21 +0100)]
Need glibc 2.8 or bigger for fallocate

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agomutex: don't attempt to use CLOCK_MONOTONIC
Jens Axboe [Mon, 20 Feb 2012 08:18:43 +0000 (09:18 +0100)]
mutex: don't attempt to use CLOCK_MONOTONIC

It's a bit of a mess. Some platforms don't have
pthread_condattr_setclock(), some have it but it appears NOT to set
the block correctly.

Accept that we have to use the realtime clock for timed mutex and just
don't touch the clock settings.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agonice() error handling
Bruce Cran [Mon, 20 Feb 2012 06:59:06 +0000 (07:59 +0100)]
nice() error handling

I've attached a patch which fixes a potential issue I noticed while
reading the POSIX specs: nice() can succeed and return -1, so it's
recommended to set errno to 0 and check it afterwards:

"As -1 is a permissible return value in a successful situation, an
application wishing to check for error situations should set errno to 0,
then call nice(), and if it returns -1, check to see whether errno is
non-zero."

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agomac: doesn't have pthread_condattr_setclock()
Jens Axboe [Fri, 17 Feb 2012 15:59:09 +0000 (16:59 +0100)]
mac: doesn't have pthread_condattr_setclock()

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agomutex: guard pthread_condattr_setclock() by defined "have ifdef"
Jens Axboe [Fri, 17 Feb 2012 12:48:08 +0000 (13:48 +0100)]
mutex: guard pthread_condattr_setclock() by defined "have ifdef"

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agomutex: more clock fixes
Jens Axboe [Thu, 16 Feb 2012 21:22:46 +0000 (22:22 +0100)]
mutex: more clock fixes

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoMutex timeout work-around
Jens Axboe [Wed, 15 Feb 2012 21:24:19 +0000 (22:24 +0100)]
Mutex timeout work-around

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoMutex fixes
Jens Axboe [Wed, 15 Feb 2012 21:20:26 +0000 (22:20 +0100)]
Mutex fixes

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoFixup includes
Jens Axboe [Wed, 15 Feb 2012 20:52:39 +0000 (21:52 +0100)]
Fixup includes

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoFix typo
Jens Axboe [Wed, 15 Feb 2012 18:40:57 +0000 (19:40 +0100)]
Fix typo

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoFix build issue for non-cgroup support
Jens Axboe [Wed, 15 Feb 2012 16:30:35 +0000 (17:30 +0100)]
Fix build issue for non-cgroup support

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoFix grammatical error
Jens Axboe [Wed, 15 Feb 2012 13:27:08 +0000 (14:27 +0100)]
Fix grammatical error

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agomutex: set and use the proper clock source
Jens Axboe [Wed, 15 Feb 2012 08:56:51 +0000 (09:56 +0100)]
mutex: set and use the proper clock source

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoRevert "Change iolog overlap assert to a debug dump"
Jens Axboe [Sat, 11 Feb 2012 08:06:58 +0000 (09:06 +0100)]
Revert "Change iolog overlap assert to a debug dump"

Issued has been fixed, restore assert.

This reverts commit 86f40280e27474c666fea75cc705caeaf94f6346.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoAdd job files for zone bug
Jens Axboe [Sat, 11 Feb 2012 08:06:36 +0000 (09:06 +0100)]
Add job files for zone bug

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoOnly attempt zone switch if we have zones enabled
Jens Axboe [Sat, 11 Feb 2012 08:04:02 +0000 (09:04 +0100)]
Only attempt zone switch if we have zones enabled

Just an offset isn't enough.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoChange iolog overlap assert to a debug dump
Jens Axboe [Fri, 10 Feb 2012 20:58:46 +0000 (21:58 +0100)]
Change iolog overlap assert to a debug dump

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoSlave aggregate output format fix
Jens Axboe [Fri, 10 Feb 2012 18:30:23 +0000 (19:30 +0100)]
Slave aggregate output format fix

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoFix missing ';' before slave disk utilization in terse output
Jens Axboe [Fri, 10 Feb 2012 18:21:50 +0000 (19:21 +0100)]
Fix missing ';' before slave disk utilization in terse output

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoFix a few other static code checker spotted "issues"
Jens Axboe [Thu, 9 Feb 2012 20:17:06 +0000 (21:17 +0100)]
Fix a few other static code checker spotted "issues"

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoFixup a few items spotted by a static code checker
Jens Axboe [Thu, 9 Feb 2012 19:55:29 +0000 (20:55 +0100)]
Fixup a few items spotted by a static code checker

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoAdd gettime.h
Jens Axboe [Thu, 9 Feb 2012 14:02:39 +0000 (15:02 +0100)]
Add gettime.h

time.h is a mix of gettime.c and time.c

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoMove variables to backend, fix up line spaces
Jens Axboe [Thu, 9 Feb 2012 10:25:24 +0000 (11:25 +0100)]
Move variables to backend, fix up line spaces

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoMove some code around to better separate front/backend
Jens Axboe [Thu, 9 Feb 2012 10:15:02 +0000 (11:15 +0100)]
Move some code around to better separate front/backend

Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 years agoMove gtod thread to gettime.c
Jens Axboe [Thu, 9 Feb 2012 09:27:10 +0000 (10:27 +0100)]
Move gtod thread to gettime.c

Signed-off-by: Jens Axboe <axboe@kernel.dk>