projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ringtest: poll for new buffers once before updating event index
[cascardo/linux.git]
/
tools
/
virtio
/
ringtest
/
main.c
diff --git
a/tools/virtio/ringtest/main.c
b/tools/virtio/ringtest/main.c
index
b00ecd6
..
f31353f
100644
(file)
--- a/
tools/virtio/ringtest/main.c
+++ b/
tools/virtio/ringtest/main.c
@@
-147,7
+147,7
@@
static void __attribute__((__flatten__)) run_guest(void)
assert(completed <= bufs);
assert(started <= bufs);
if (do_sleep) {
assert(completed <= bufs);
assert(started <= bufs);
if (do_sleep) {
- if (enable_call())
+ if (
used_empty() &&
enable_call())
wait_for_call();
} else {
poll_used();
wait_for_call();
} else {
poll_used();
@@
-172,7
+172,7
@@
static void __attribute__((__flatten__)) run_host(void)
for (;;) {
if (do_sleep) {
for (;;) {
if (do_sleep) {
- if (enable_kick())
+ if (
avail_empty() &&
enable_kick())
wait_for_kick();
} else {
poll_avail();
wait_for_kick();
} else {
poll_avail();