Displaying 14 results from an estimated 14 matches for "need_event".
2017 Oct 26
3
[PATCH] virtio/ringtest: fix up need_event math
...virtio/ringtest/ring.c
index 6b70c4e..d044a88 100644
--- a/tools/virtio/ringtest/ring.c
+++ b/tools/virtio/ringtest/ring.c
@@ -196,16 +196,18 @@ bool enable_call()
void kick_available(void)
{
+ bool need;
+
/* Flush in previous flags write */
/* Barrier C (for pairing) */
smp_mb();
- if (!need_event(event->kick_index,
- guest.avail_idx,
- guest.kicked_avail_idx))
- return;
+ need = need_event(event->kick_index,
+ guest.avail_idx,
+ guest.kicked_avail_idx);
guest.kicked_avail_idx = guest.avail_idx;
- kick();
+ if (need)
+ kick();
}
/* host side */
@@ -265,14 +267,1...
2017 Oct 26
3
[PATCH] virtio/ringtest: fix up need_event math
...virtio/ringtest/ring.c
index 6b70c4e..d044a88 100644
--- a/tools/virtio/ringtest/ring.c
+++ b/tools/virtio/ringtest/ring.c
@@ -196,16 +196,18 @@ bool enable_call()
void kick_available(void)
{
+ bool need;
+
/* Flush in previous flags write */
/* Barrier C (for pairing) */
smp_mb();
- if (!need_event(event->kick_index,
- guest.avail_idx,
- guest.kicked_avail_idx))
- return;
+ need = need_event(event->kick_index,
+ guest.avail_idx,
+ guest.kicked_avail_idx);
guest.kicked_avail_idx = guest.avail_idx;
- kick();
+ if (need)
+ kick();
}
/* host side */
@@ -265,14 +267,1...
2017 Dec 18
0
[PATCH v2] virtio/ringtest: fix up need_event math
...virtio/ringtest/ring.c
index 747c5dd..2b9859b 100644
--- a/tools/virtio/ringtest/ring.c
+++ b/tools/virtio/ringtest/ring.c
@@ -188,16 +188,18 @@ bool enable_call()
void kick_available(void)
{
+ bool need;
+
/* Flush in previous flags write */
/* Barrier C (for pairing) */
smp_mb();
- if (!need_event(event->kick_index,
- guest.avail_idx,
- guest.kicked_avail_idx))
- return;
+ need = need_event(event->kick_index,
+ guest.avail_idx,
+ guest.kicked_avail_idx);
guest.kicked_avail_idx = guest.avail_idx;
- kick();
+ if (need)
+ kick();
}
/* host side */
@@ -253,14 +255,1...
2017 Dec 18
0
[PATCH v2] virtio/ringtest: fix up need_event math
...virtio/ringtest/ring.c
index 747c5dd..2b9859b 100644
--- a/tools/virtio/ringtest/ring.c
+++ b/tools/virtio/ringtest/ring.c
@@ -188,16 +188,18 @@ bool enable_call()
void kick_available(void)
{
+ bool need;
+
/* Flush in previous flags write */
/* Barrier C (for pairing) */
smp_mb();
- if (!need_event(event->kick_index,
- guest.avail_idx,
- guest.kicked_avail_idx))
- return;
+ need = need_event(event->kick_index,
+ guest.avail_idx,
+ guest.kicked_avail_idx);
guest.kicked_avail_idx = guest.avail_idx;
- kick();
+ if (need)
+ kick();
}
/* host side */
@@ -253,14 +255,1...
2017 Oct 27
1
[PATCH] virtio/ringtest: virtio_ring: fix up need_event math
...bbc3043..5fd3fbc 100644
--- a/tools/virtio/ringtest/virtio_ring_0_9.c
+++ b/tools/virtio/ringtest/virtio_ring_0_9.c
@@ -225,16 +225,18 @@ bool enable_call()
void kick_available(void)
{
+ bool need;
+
/* Flush in previous flags write */
/* Barrier C (for pairing) */
smp_mb();
- if (!vring_need_event(vring_avail_event(&ring),
- guest.avail_idx,
- guest.kicked_avail_idx))
- return;
+ need = vring_need_event(vring_avail_event(&ring),
+ guest.avail_idx,
+ guest.kicked_avail_idx);
guest.kicked_avail_idx = guest.avail_idx;
- kick();
+ if (need)
+ kick();
}
/*...
2017 Oct 26
0
[PATCH] virtio/ringtest: fix up need_event math
On Thu, 26 Oct 2017 04:48:01 +0300
"Michael S. Tsirkin" <mst at redhat.com> wrote:
> last kicked event index must be updated unconditionally:
> even if we don't need to kick, we do not want to re-check
> the same entry for events.
>
> Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
> ---
> tools/virtio/ringtest/ring.c | 24
2017 Oct 27
1
[PATCH] virtio/ringtest: virtio_ring: fix up need_event math
...bbc3043..5fd3fbc 100644
--- a/tools/virtio/ringtest/virtio_ring_0_9.c
+++ b/tools/virtio/ringtest/virtio_ring_0_9.c
@@ -225,16 +225,18 @@ bool enable_call()
void kick_available(void)
{
+ bool need;
+
/* Flush in previous flags write */
/* Barrier C (for pairing) */
smp_mb();
- if (!vring_need_event(vring_avail_event(&ring),
- guest.avail_idx,
- guest.kicked_avail_idx))
- return;
+ need = vring_need_event(vring_avail_event(&ring),
+ guest.avail_idx,
+ guest.kicked_avail_idx);
guest.kicked_avail_idx = guest.avail_idx;
- kick();
+ if (need)
+ kick();
}
/*...
2018 Feb 08
0
[PULL] virtio, vhost: fixes, cleanups, features
...VHOST_SET_VRING_CALL
vhost: don't hold onto file pointer for VHOST_SET_VRING_ERR
vhost: don't hold onto file pointer for VHOST_SET_LOG_FD
Markus Elfring (1):
vhost/scsi: Improve a size determination in four functions
Michael S. Tsirkin (2):
virtio/ringtest: fix up need_event math
virtio/ringtest: virtio_ring: fix up need_event math
Peter Malone (1):
ringtest: ring.c malloc & memset to calloc
Stefan Hajnoczi (1):
virtio_blk: print capacity at probe time
Tom?? Golembiovsk? (1):
virtio_balloon: include disk/file caches memory statistics
Ton...
2010 Nov 02
0
[ANNOUNCE] libXi 1.4.0
...Alan Coopersmith (1):
Update Sun license notices to current X.Org standard form
Carlos Garnacho (1):
Fix typo when converting raw events from the wire.
Dan Nicholson (1):
Need both xmlto and asciidoc to install man pages from a checkout
Fernando Carrijo (1):
Purge macros NEED_EVENTS and NEED_REPLIES
Gaetan Nadon (21):
.gitignore: use common defaults with custom section # 24239
Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
Deploy the new XORG_DEFAULT_OPTIONS #24242
INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24...
2016 Jan 21
1
[PATCH] tools/virtio: add ringtest utilities
...de "main.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+/* Next - Where next entry will be written.
+ * Prev - "Next" value when event triggered previously.
+ * Event - Peer requested event after writing this entry.
+ */
+static inline bool need_event(unsigned short event,
+ unsigned short next,
+ unsigned short prev)
+{
+ return (unsigned short)(next - event - 1) < (unsigned short)(next - prev);
+}
+
+/* Design:
+ * Guest adds descriptors with unique index values and DESC_HW in flags.
+ * Host overwrites used descriptors with...
2016 Jan 21
1
[PATCH] tools/virtio: add ringtest utilities
...de "main.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+/* Next - Where next entry will be written.
+ * Prev - "Next" value when event triggered previously.
+ * Event - Peer requested event after writing this entry.
+ */
+static inline bool need_event(unsigned short event,
+ unsigned short next,
+ unsigned short prev)
+{
+ return (unsigned short)(next - event - 1) < (unsigned short)(next - prev);
+}
+
+/* Design:
+ * Guest adds descriptors with unique index values and DESC_HW in flags.
+ * Host overwrites used descriptors with...
2010 Nov 21
0
[ANNOUNCE] libX11 1.4.0
...: Disable fop documentation by default
config: Fix architecture check for OS/2 to skip nios2 cpu
config: Check host string when deciding architecture to build for
Daniel Stone (1):
configure.ac: Change from deprecated AC_DEFINE_DIR to AX_
Fernando Carrijo (1):
Purge macros NEED_EVENTS and NEED_REPLIES
Gaetan Nadon (13):
specs: specdir is required to install xml files
specs: use pattern rules rather than suffix rules
specs: move indexterm from glossdef to glossterm
specs: update .gitignore now that all groff generated files are gone
specs: xsl styl...
2011 May 04
27
[PATCH 00/18] virtio and vhost-net performance enhancements
OK, here's a large patchset that implements the virtio spec update that I
sent earlier. It supercedes the PUBLISH_USED_IDX patches
I sent out earlier.
I know it's a lot to ask but please test, and please consider for 2.6.40 :)
I see nice performance improvements: one run showed going from 12
to 18 Gbit/s host to guest with netperf, but I did not spend a lot
of time testing performance,
2011 May 04
27
[PATCH 00/18] virtio and vhost-net performance enhancements
OK, here's a large patchset that implements the virtio spec update that I
sent earlier. It supercedes the PUBLISH_USED_IDX patches
I sent out earlier.
I know it's a lot to ask but please test, and please consider for 2.6.40 :)
I see nice performance improvements: one run showed going from 12
to 18 Gbit/s host to guest with netperf, but I did not spend a lot
of time testing performance,