search for: last_add_time

Displaying 20 results from an estimated 90 matches for "last_add_time".

2018 Apr 13
3
[RFC v2] virtio: support packed ring
...gt; > + if (unlikely(vq->broken)) { > > + END_USE(vq); > > + return -EIO; > > + } > > + > > +#ifdef DEBUG > > + { > > + ktime_t now = ktime_get(); > > + > > + /* No kick or get, with .1 second between? Warn. */ > > + if (vq->last_add_time_valid) > > + WARN_ON(ktime_to_ms(ktime_sub(now, vq->last_add_time)) > > + > 100); > > + vq->last_add_time = now; > > + vq->last_add_time_valid = true; > > + } > > +#endif > > + > > + BUG_ON(total_sg == 0); > > + > >...
2018 Apr 13
3
[RFC v2] virtio: support packed ring
...gt; > + if (unlikely(vq->broken)) { > > + END_USE(vq); > > + return -EIO; > > + } > > + > > +#ifdef DEBUG > > + { > > + ktime_t now = ktime_get(); > > + > > + /* No kick or get, with .1 second between? Warn. */ > > + if (vq->last_add_time_valid) > > + WARN_ON(ktime_to_ms(ktime_sub(now, vq->last_add_time)) > > + > 100); > > + vq->last_add_time = now; > > + vq->last_add_time_valid = true; > > + } > > +#endif > > + > > + BUG_ON(total_sg == 0); > > + > >...
2018 Nov 07
2
[PATCH net-next v2 3/5] virtio_ring: add packed ring support
...> + BUG_ON(ctx && vq->indirect); > + > + if (unlikely(vq->broken)) { > + END_USE(vq); > + return -EIO; > + } > + > +#ifdef DEBUG > + { > + ktime_t now = ktime_get(); > + > + /* No kick or get, with .1 second between? Warn. */ > + if (vq->last_add_time_valid) > + WARN_ON(ktime_to_ms(ktime_sub(now, vq->last_add_time)) > + > 100); > + vq->last_add_time = now; > + vq->last_add_time_valid = true; > + } > +#endif > + > + BUG_ON(total_sg == 0); > + > + head = vq->next_avail_idx; > + avail_wrap...
2018 Nov 07
2
[PATCH net-next v2 3/5] virtio_ring: add packed ring support
...> + BUG_ON(ctx && vq->indirect); > + > + if (unlikely(vq->broken)) { > + END_USE(vq); > + return -EIO; > + } > + > +#ifdef DEBUG > + { > + ktime_t now = ktime_get(); > + > + /* No kick or get, with .1 second between? Warn. */ > + if (vq->last_add_time_valid) > + WARN_ON(ktime_to_ms(ktime_sub(now, vq->last_add_time)) > + > 100); > + vq->last_add_time = now; > + vq->last_add_time_valid = true; > + } > +#endif > + > + BUG_ON(total_sg == 0); > + > + head = vq->next_avail_idx; > + avail_wrap...
2018 Apr 17
0
[RFC v2] virtio: support packed ring
...;broken)) { >>> + END_USE(vq); >>> + return -EIO; >>> + } >>> + >>> +#ifdef DEBUG >>> + { >>> + ktime_t now = ktime_get(); >>> + >>> + /* No kick or get, with .1 second between? Warn. */ >>> + if (vq->last_add_time_valid) >>> + WARN_ON(ktime_to_ms(ktime_sub(now, vq->last_add_time)) >>> + > 100); >>> + vq->last_add_time = now; >>> + vq->last_add_time_valid = true; >>> + } >>> +#endif >>> + >>> + BUG_ON(total_sg == 0...
2018 Nov 08
0
[PATCH net-next v2 3/5] virtio_ring: add packed ring support
...gt; > + if (unlikely(vq->broken)) { > > + END_USE(vq); > > + return -EIO; > > + } > > + > > +#ifdef DEBUG > > + { > > + ktime_t now = ktime_get(); > > + > > + /* No kick or get, with .1 second between? Warn. */ > > + if (vq->last_add_time_valid) > > + WARN_ON(ktime_to_ms(ktime_sub(now, vq->last_add_time)) > > + > 100); > > + vq->last_add_time = now; > > + vq->last_add_time_valid = true; > > + } > > +#endif > > + > > + BUG_ON(total_sg == 0); > > + > >...
2018 Apr 25
0
[RFC v3 3/5] virtio_ring: add packed ring support
...r; + bool indirect; + + START_USE(vq); + + BUG_ON(data == NULL); + BUG_ON(ctx && vq->indirect); + + if (unlikely(vq->broken)) { + END_USE(vq); + return -EIO; + } + +#ifdef DEBUG + { + ktime_t now = ktime_get(); + + /* No kick or get, with .1 second between? Warn. */ + if (vq->last_add_time_valid) + WARN_ON(ktime_to_ms(ktime_sub(now, vq->last_add_time)) + > 100); + vq->last_add_time = now; + vq->last_add_time_valid = true; + } +#endif + + BUG_ON(total_sg == 0); + + head = vq->next_avail_idx; + wrap_counter = vq->wrap_counter; + + if (virtqueue_use_indirec...
2018 May 22
0
[RFC v5 3/5] virtio_ring: add packed ring support
...r; + bool indirect; + + START_USE(vq); + + BUG_ON(data == NULL); + BUG_ON(ctx && vq->indirect); + + if (unlikely(vq->broken)) { + END_USE(vq); + return -EIO; + } + +#ifdef DEBUG + { + ktime_t now = ktime_get(); + + /* No kick or get, with .1 second between? Warn. */ + if (vq->last_add_time_valid) + WARN_ON(ktime_to_ms(ktime_sub(now, vq->last_add_time)) + > 100); + vq->last_add_time = now; + vq->last_add_time_valid = true; + } +#endif + + BUG_ON(total_sg == 0); + + head = vq->next_avail_idx; + avail_wrap_counter = vq->avail_wrap_counter; + + if (virtqueue...
2018 Jul 11
0
[PATCH net-next v2 3/5] virtio_ring: add packed ring support
...r; + bool indirect; + + START_USE(vq); + + BUG_ON(data == NULL); + BUG_ON(ctx && vq->indirect); + + if (unlikely(vq->broken)) { + END_USE(vq); + return -EIO; + } + +#ifdef DEBUG + { + ktime_t now = ktime_get(); + + /* No kick or get, with .1 second between? Warn. */ + if (vq->last_add_time_valid) + WARN_ON(ktime_to_ms(ktime_sub(now, vq->last_add_time)) + > 100); + vq->last_add_time = now; + vq->last_add_time_valid = true; + } +#endif + + BUG_ON(total_sg == 0); + + head = vq->next_avail_idx; + avail_wrap_counter = vq->avail_wrap_counter; + + if (virtqueue...
2018 May 16
0
[RFC v4 3/5] virtio_ring: add packed ring support
...d; + bool indirect; + + START_USE(vq); + + BUG_ON(data == NULL); + BUG_ON(ctx && vq->indirect); + + if (unlikely(vq->broken)) { + END_USE(vq); + return -EIO; + } + +#ifdef DEBUG + { + ktime_t now = ktime_get(); + + /* No kick or get, with .1 second between? Warn. */ + if (vq->last_add_time_valid) + WARN_ON(ktime_to_ms(ktime_sub(now, vq->last_add_time)) + > 100); + vq->last_add_time = now; + vq->last_add_time_valid = true; + } +#endif + + BUG_ON(total_sg == 0); + + head = vq->next_avail_idx; + wrap_counter = vq->wrap_counter; + + if (virtqueue_use_indirec...
2018 Sep 07
1
[PATCH net-next v2 3/5] virtio_ring: add packed ring support
...> + BUG_ON(ctx && vq->indirect); > + > + if (unlikely(vq->broken)) { > + END_USE(vq); > + return -EIO; > + } > + > +#ifdef DEBUG > + { > + ktime_t now = ktime_get(); > + > + /* No kick or get, with .1 second between? Warn. */ > + if (vq->last_add_time_valid) > + WARN_ON(ktime_to_ms(ktime_sub(now, vq->last_add_time)) > + > 100); > + vq->last_add_time = now; > + vq->last_add_time_valid = true; > + } > +#endif Add incline helpers for this debug stuff rather than duplicate it from split ring? > + >...
2018 May 16
2
[RFC v4 3/5] virtio_ring: add packed ring support
...> + BUG_ON(ctx && vq->indirect); > + > + if (unlikely(vq->broken)) { > + END_USE(vq); > + return -EIO; > + } > + > +#ifdef DEBUG > + { > + ktime_t now = ktime_get(); > + > + /* No kick or get, with .1 second between? Warn. */ > + if (vq->last_add_time_valid) > + WARN_ON(ktime_to_ms(ktime_sub(now, vq->last_add_time)) > + > 100); > + vq->last_add_time = now; > + vq->last_add_time_valid = true; > + } > +#endif > + > + BUG_ON(total_sg == 0); > + > + head = vq->next_avail_idx; > + wrap_count...
2018 May 16
2
[RFC v4 3/5] virtio_ring: add packed ring support
...> + BUG_ON(ctx && vq->indirect); > + > + if (unlikely(vq->broken)) { > + END_USE(vq); > + return -EIO; > + } > + > +#ifdef DEBUG > + { > + ktime_t now = ktime_get(); > + > + /* No kick or get, with .1 second between? Warn. */ > + if (vq->last_add_time_valid) > + WARN_ON(ktime_to_ms(ktime_sub(now, vq->last_add_time)) > + > 100); > + vq->last_add_time = now; > + vq->last_add_time_valid = true; > + } > +#endif > + > + BUG_ON(total_sg == 0); > + > + head = vq->next_avail_idx; > + wrap_count...
2015 Sep 09
2
virtio optimization idea
...ck (untested): Signed-off-by: Michael S. Tsirkin <mst at redhat.com> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 096b857..9363b50 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -91,6 +91,7 @@ struct vring_virtqueue { bool last_add_time_valid; ktime_t last_add_time; #endif + u16 *avail; /* Tokens for callbacks. */ void *data[]; @@ -236,7 +237,10 @@ static inline int virtqueue_add(struct virtqueue *_vq, /* Put entry in available array (but don't update avail->idx until they * do sync). */ avail = virtio16_to_...
2015 Sep 09
2
virtio optimization idea
...ck (untested): Signed-off-by: Michael S. Tsirkin <mst at redhat.com> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 096b857..9363b50 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -91,6 +91,7 @@ struct vring_virtqueue { bool last_add_time_valid; ktime_t last_add_time; #endif + u16 *avail; /* Tokens for callbacks. */ void *data[]; @@ -236,7 +237,10 @@ static inline int virtqueue_add(struct virtqueue *_vq, /* Put entry in available array (but don't update avail->idx until they * do sync). */ avail = virtio16_to_...
2018 May 29
2
[RFC v5 3/5] virtio_ring: add packed ring support
...> + BUG_ON(ctx && vq->indirect); > + > + if (unlikely(vq->broken)) { > + END_USE(vq); > + return -EIO; > + } > + > +#ifdef DEBUG > + { > + ktime_t now = ktime_get(); > + > + /* No kick or get, with .1 second between? Warn. */ > + if (vq->last_add_time_valid) > + WARN_ON(ktime_to_ms(ktime_sub(now, vq->last_add_time)) > + > 100); > + vq->last_add_time = now; > + vq->last_add_time_valid = true; > + } > +#endif > + > + BUG_ON(total_sg == 0); > + > + head = vq->next_avail_idx; > + avail_wrap...
2018 May 29
2
[RFC v5 3/5] virtio_ring: add packed ring support
...> + BUG_ON(ctx && vq->indirect); > + > + if (unlikely(vq->broken)) { > + END_USE(vq); > + return -EIO; > + } > + > +#ifdef DEBUG > + { > + ktime_t now = ktime_get(); > + > + /* No kick or get, with .1 second between? Warn. */ > + if (vq->last_add_time_valid) > + WARN_ON(ktime_to_ms(ktime_sub(now, vq->last_add_time)) > + > 100); > + vq->last_add_time = now; > + vq->last_add_time_valid = true; > + } > +#endif > + > + BUG_ON(total_sg == 0); > + > + head = vq->next_avail_idx; > + avail_wrap...
2018 May 16
8
[RFC v4 0/5] virtio: support packed ring
Hello everyone, This RFC implements packed ring support in virtio driver. Some simple functional tests have been done with Jason's packed ring implementation in vhost: https://lkml.org/lkml/2018/4/23/12 Both of ping and netperf worked as expected (with EVENT_IDX disabled). TODO: - Refinements (for code and commit log); - More tests; - Bug fixes; RFC v3 -> RFC v4: - Make ID allocation
2018 Apr 17
2
[RFC v2] virtio: support packed ring
...return -EIO; > > > > + } > > > > + > > > > +#ifdef DEBUG > > > > + { > > > > + ktime_t now = ktime_get(); > > > > + > > > > + /* No kick or get, with .1 second between? Warn. */ > > > > + if (vq->last_add_time_valid) > > > > + WARN_ON(ktime_to_ms(ktime_sub(now, vq->last_add_time)) > > > > + > 100); > > > > + vq->last_add_time = now; > > > > + vq->last_add_time_valid = true; > > > > + } > > > > +#endif > &gt...
2018 Apr 17
2
[RFC v2] virtio: support packed ring
...return -EIO; > > > > + } > > > > + > > > > +#ifdef DEBUG > > > > + { > > > > + ktime_t now = ktime_get(); > > > > + > > > > + /* No kick or get, with .1 second between? Warn. */ > > > > + if (vq->last_add_time_valid) > > > > + WARN_ON(ktime_to_ms(ktime_sub(now, vq->last_add_time)) > > > > + > 100); > > > > + vq->last_add_time = now; > > > > + vq->last_add_time_valid = true; > > > > + } > > > > +#endif > &gt...