projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1188caf
)
[PATCH] Fix busy-looping with aio engine and depth > 1
author
Jens Axboe
<jens.axboe@oracle.com>
Mon, 8 Jan 2007 21:27:05 +0000
(22:27 +0100)
committer
Jens Axboe
<jens.axboe@oracle.com>
Mon, 8 Jan 2007 21:27:05 +0000
(22:27 +0100)
It's ok for io_getevents() to return 0, if min_nr is 0. Check
first if io_getevents() returns >= min_nr, if so then just break
and return.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
engines/fio-engine-libaio.c
patch
|
blob
|
blame
|
history
diff --git
a/engines/fio-engine-libaio.c
b/engines/fio-engine-libaio.c
index 45e69e90b600704df35dfb1d2f23a91857531c7f..da43f18ce1571b7c729ceb35fce02ec1aae00e12 100644
(file)
--- a/
engines/fio-engine-libaio.c
+++ b/
engines/fio-engine-libaio.c
@@
-51,7
+51,9
@@
static int fio_libaio_getevents(struct thread_data *td, int min, int max,
do {
r = io_getevents(ld->aio_ctx, min, max, ld->aio_events, t);
- if (r == -EAGAIN) {
+ if (r >= min)
+ break;
+ else if (r == -EAGAIN) {
usleep(100);
continue;
} else if (r == -EINTR)