Displaying 18 results from an estimated 18 matches for "vhost_add_used_idx".
2017 Sep 27
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...da 100644
> > > --- a/drivers/vhost/vhost.c
> > > +++ b/drivers/vhost/vhost.c
> > > @@ -2178,6 +2178,39 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len)
> > > }
> > > EXPORT_SYMBOL_GPL(vhost_add_used);
> > > +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n)
> > > +{
> > > + u16 old, new;
> > > +
> > > + old = vq->last_used_idx;
> > > + new = (vq->last_used_idx += n);
> > > + /* If the driver never bothers to signal in a very long while,
> > > + * u...
2017 Sep 27
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...da 100644
> > > --- a/drivers/vhost/vhost.c
> > > +++ b/drivers/vhost/vhost.c
> > > @@ -2178,6 +2178,39 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len)
> > > }
> > > EXPORT_SYMBOL_GPL(vhost_add_used);
> > > +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n)
> > > +{
> > > + u16 old, new;
> > > +
> > > + old = vq->last_used_idx;
> > > + new = (vq->last_used_idx += n);
> > > + /* If the driver never bothers to signal in a very long while,
> > > + * u...
2017 Sep 26
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...st.c b/drivers/vhost/vhost.c
> index 8424166d..6532cda 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -2178,6 +2178,39 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len)
> }
> EXPORT_SYMBOL_GPL(vhost_add_used);
>
> +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n)
> +{
> + u16 old, new;
> +
> + old = vq->last_used_idx;
> + new = (vq->last_used_idx += n);
> + /* If the driver never bothers to signal in a very long while,
> + * used index might wrap around. If that happens, invalidate
> + * sig...
2017 Sep 26
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...st.c b/drivers/vhost/vhost.c
> index 8424166d..6532cda 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -2178,6 +2178,39 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len)
> }
> EXPORT_SYMBOL_GPL(vhost_add_used);
>
> +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n)
> +{
> + u16 old, new;
> +
> + old = vq->last_used_idx;
> + new = (vq->last_used_idx += n);
> + /* If the driver never bothers to signal in a very long while,
> + * used index might wrap around. If that happens, invalidate
> + * sig...
2017 Sep 27
0
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...t; index 8424166d..6532cda 100644
>> --- a/drivers/vhost/vhost.c
>> +++ b/drivers/vhost/vhost.c
>> @@ -2178,6 +2178,39 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len)
>> }
>> EXPORT_SYMBOL_GPL(vhost_add_used);
>>
>> +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n)
>> +{
>> + u16 old, new;
>> +
>> + old = vq->last_used_idx;
>> + new = (vq->last_used_idx += n);
>> + /* If the driver never bothers to signal in a very long while,
>> + * used index might wrap around. If that happe...
2017 Sep 22
0
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...tions(+)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 8424166d..6532cda 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -2178,6 +2178,39 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len)
}
EXPORT_SYMBOL_GPL(vhost_add_used);
+int vhost_add_used_idx(struct vhost_virtqueue *vq, int n)
+{
+ u16 old, new;
+
+ old = vq->last_used_idx;
+ new = (vq->last_used_idx += n);
+ /* If the driver never bothers to signal in a very long while,
+ * used index might wrap around. If that happens, invalidate
+ * signalled_used index we stored. TODO: make...
2017 Sep 22
17
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
...d update used ring in a
batch. This intends to speed up used ring updating and improve the
cache utilization. Test shows about ~22% improvement in tx pss.
Please review.
Jason Wang (5):
vhost: split out ring head fetching logic
vhost: introduce helper to prefetch desc index
vhost: introduce vhost_add_used_idx()
vhost_net: rename VHOST_RX_BATCH to VHOST_NET_BATCH
vhost_net: basic tx virtqueue batched processing
drivers/vhost/net.c | 221 ++++++++++++++++++++++++++++----------------------
drivers/vhost/vhost.c | 165 +++++++++++++++++++++++++++++++------
drivers/vhost/vhost.h | 9 ++
3 files cha...
2017 Sep 22
17
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
...d update used ring in a
batch. This intends to speed up used ring updating and improve the
cache utilization. Test shows about ~22% improvement in tx pss.
Please review.
Jason Wang (5):
vhost: split out ring head fetching logic
vhost: introduce helper to prefetch desc index
vhost: introduce vhost_add_used_idx()
vhost_net: rename VHOST_RX_BATCH to VHOST_NET_BATCH
vhost_net: basic tx virtqueue batched processing
drivers/vhost/net.c | 221 ++++++++++++++++++++++++++++----------------------
drivers/vhost/vhost.c | 165 +++++++++++++++++++++++++++++++------
drivers/vhost/vhost.h | 9 ++
3 files cha...
2017 Sep 27
2
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
...this with or without tx napi in guest?
MoonGen is used in guest for better numbers.
Thanks
>
>> Please review.
>>
>> Jason Wang (5):
>> vhost: split out ring head fetching logic
>> vhost: introduce helper to prefetch desc index
>> vhost: introduce vhost_add_used_idx()
>> vhost_net: rename VHOST_RX_BATCH to VHOST_NET_BATCH
>> vhost_net: basic tx virtqueue batched processing
>>
>> drivers/vhost/net.c | 221 ++++++++++++++++++++++++++++----------------------
>> drivers/vhost/vhost.c | 165 +++++++++++++++++++++++++++++++---...
2017 Sep 27
2
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
...this with or without tx napi in guest?
MoonGen is used in guest for better numbers.
Thanks
>
>> Please review.
>>
>> Jason Wang (5):
>> vhost: split out ring head fetching logic
>> vhost: introduce helper to prefetch desc index
>> vhost: introduce vhost_add_used_idx()
>> vhost_net: rename VHOST_RX_BATCH to VHOST_NET_BATCH
>> vhost_net: basic tx virtqueue batched processing
>>
>> drivers/vhost/net.c | 221 ++++++++++++++++++++++++++++----------------------
>> drivers/vhost/vhost.c | 165 +++++++++++++++++++++++++++++++---...
2017 Sep 28
1
[PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing
...}
> + if (err != len)
> + pr_debug("Truncated TX packet: "
> + " len %d != %zd\n", err, len);
> + if (!zcopy) {
> + vhost_add_used_idx(vq, 1);
> + vhost_signal(&net->dev, vq);
> + } else if (!zcopy_used) {
> + vhost_add_used_and_signal(&net->dev,
> + vq, head, 0);
Whil...
2017 Sep 28
1
[PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing
...}
> + if (err != len)
> + pr_debug("Truncated TX packet: "
> + " len %d != %zd\n", err, len);
> + if (!zcopy) {
> + vhost_add_used_idx(vq, 1);
> + vhost_signal(&net->dev, vq);
> + } else if (!zcopy_used) {
> + vhost_add_used_and_signal(&net->dev,
> + vq, head, 0);
Whil...
2017 Sep 26
0
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
...re it can be addressed though.
> Test shows about ~22% improvement in tx pss.
Is this with or without tx napi in guest?
> Please review.
>
> Jason Wang (5):
> vhost: split out ring head fetching logic
> vhost: introduce helper to prefetch desc index
> vhost: introduce vhost_add_used_idx()
> vhost_net: rename VHOST_RX_BATCH to VHOST_NET_BATCH
> vhost_net: basic tx virtqueue batched processing
>
> drivers/vhost/net.c | 221 ++++++++++++++++++++++++++++----------------------
> drivers/vhost/vhost.c | 165 +++++++++++++++++++++++++++++++------
> drivers/vhost...
2017 Sep 26
0
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
...tends to speed up used ring updating and improve the
> cache utilization. Test shows about ~22% improvement in tx pss.
> Please review.
>
> Jason Wang (5):
> vhost: split out ring head fetching logic
> vhost: introduce helper to prefetch desc index
> vhost: introduce vhost_add_used_idx()
Please squash these new APIs into where they are used.
This split-up just makes review harder for me as
I can't figure out how the new APIs are used.
> vhost_net: rename VHOST_RX_BATCH to VHOST_NET_BATCH
This is ok as a separate patch.
> vhost_net: basic tx virtqueue batched pr...
2017 Sep 27
0
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
...understand. Did you set napi_tx to true or false?
> >
> > > Please review.
> > >
> > > Jason Wang (5):
> > > vhost: split out ring head fetching logic
> > > vhost: introduce helper to prefetch desc index
> > > vhost: introduce vhost_add_used_idx()
> > > vhost_net: rename VHOST_RX_BATCH to VHOST_NET_BATCH
> > > vhost_net: basic tx virtqueue batched processing
> > >
> > > drivers/vhost/net.c | 221 ++++++++++++++++++++++++++++----------------------
> > > drivers/vhost/vhost.c | 165 +++...
2017 Sep 22
0
[PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing
...ubuf_put(ubufs);
+ nvq->upend_idx =
+ ((unsigned)nvq->upend_idx - 1) % UIO_MAXIOV;
+ }
+ vhost_discard_vq_desc(vq, 1);
+ goto out;
+ }
+ if (err != len)
+ pr_debug("Truncated TX packet: "
+ " len %d != %zd\n", err, len);
+ if (!zcopy) {
+ vhost_add_used_idx(vq, 1);
+ vhost_signal(&net->dev, vq);
+ } else if (!zcopy_used) {
+ vhost_add_used_and_signal(&net->dev,
+ vq, head, 0);
+ } else
+ vhost_zerocopy_signal_used(net, vq);
+ vhost_net_tx_packet(net);
+ if (unlikely(total_len >= VHOST_NET_WEIGHT)) {
+ vhost...
2017 Sep 26
2
[PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing
...((unsigned)nvq->upend_idx - 1) % UIO_MAXIOV;
> + }
> + vhost_discard_vq_desc(vq, 1);
> + goto out;
> + }
> + if (err != len)
> + pr_debug("Truncated TX packet: "
> + " len %d != %zd\n", err, len);
> + if (!zcopy) {
> + vhost_add_used_idx(vq, 1);
> + vhost_signal(&net->dev, vq);
> + } else if (!zcopy_used) {
> + vhost_add_used_and_signal(&net->dev,
> + vq, head, 0);
> + } else
> + vhost_zerocopy_signal_used(net, vq);
> + vhost_net_tx_packet(net);
> + if (unlikely(total_l...
2017 Sep 26
2
[PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing
...((unsigned)nvq->upend_idx - 1) % UIO_MAXIOV;
> + }
> + vhost_discard_vq_desc(vq, 1);
> + goto out;
> + }
> + if (err != len)
> + pr_debug("Truncated TX packet: "
> + " len %d != %zd\n", err, len);
> + if (!zcopy) {
> + vhost_add_used_idx(vq, 1);
> + vhost_signal(&net->dev, vq);
> + } else if (!zcopy_used) {
> + vhost_add_used_and_signal(&net->dev,
> + vq, head, 0);
> + } else
> + vhost_zerocopy_signal_used(net, vq);
> + vhost_net_tx_packet(net);
> + if (unlikely(total_l...