search for: rvq

Displaying 20 results from an estimated 275 matches for "rvq".

Did you mean: req
2018 Jul 23
3
[PATCH net-next v6 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...in the next patch. And with the patch, > qemu can set differently the busyloop_timeout for rx queue. > > Signed-off-by: Tonghao Zhang <xiangxia.m.yue at gmail.com> > --- ... > +static void vhost_net_busy_poll_vq_check(struct vhost_net *net, > + struct vhost_virtqueue *rvq, > + struct vhost_virtqueue *tvq, > + bool rx) > +{ > + struct socket *sock = rvq->private_data; > + > + if (rx) { > + if (!vhost_vq_avail_empty(&net->dev, tvq)) { > + vhost_poll_queue(&tvq->poll); > + } else if (unlikely(vhost_enable_notify...
2018 Jul 23
3
[PATCH net-next v6 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...in the next patch. And with the patch, > qemu can set differently the busyloop_timeout for rx queue. > > Signed-off-by: Tonghao Zhang <xiangxia.m.yue at gmail.com> > --- ... > +static void vhost_net_busy_poll_vq_check(struct vhost_net *net, > + struct vhost_virtqueue *rvq, > + struct vhost_virtqueue *tvq, > + bool rx) > +{ > + struct socket *sock = rvq->private_data; > + > + if (rx) { > + if (!vhost_vq_avail_empty(&net->dev, tvq)) { > + vhost_poll_queue(&tvq->poll); > + } else if (unlikely(vhost_enable_notify...
2018 Jul 24
3
[PATCH net-next v6 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...t;>>>> Signed-off-by: Tonghao Zhang <xiangxia.m.yue at gmail.com> >>>>> --- >>>> ... >>>>> +static void vhost_net_busy_poll_vq_check(struct vhost_net *net, >>>>> + struct vhost_virtqueue *rvq, >>>>> + struct vhost_virtqueue *tvq, >>>>> + bool rx) >>>>> +{ >>>>> + struct socket *sock = rvq->private_data; >>>>> + >>>>> +...
2018 Jul 24
3
[PATCH net-next v6 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...t;>>>> Signed-off-by: Tonghao Zhang <xiangxia.m.yue at gmail.com> >>>>> --- >>>> ... >>>>> +static void vhost_net_busy_poll_vq_check(struct vhost_net *net, >>>>> + struct vhost_virtqueue *rvq, >>>>> + struct vhost_virtqueue *tvq, >>>>> + bool rx) >>>>> +{ >>>>> + struct socket *sock = rvq->private_data; >>>>> + >>>>> +...
2017 Mar 29
2
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
On 2017?03?23? 13:34, Jason Wang wrote: > > >> >>> +{ >>> + if (rvq->rh != rvq->rt) >>> + goto out; >>> + >>> + rvq->rh = rvq->rt = 0; >>> + rvq->rt = skb_array_consume_batched_bh(rvq->rx_array, rvq->rxq, >>> + VHOST_RX_BATCH); >> A comment explaining why is...
2017 Mar 29
2
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
On 2017?03?23? 13:34, Jason Wang wrote: > > >> >>> +{ >>> + if (rvq->rh != rvq->rt) >>> + goto out; >>> + >>> + rvq->rh = rvq->rt = 0; >>> + rvq->rt = skb_array_consume_batched_bh(rvq->rx_array, rvq->rxq, >>> + VHOST_RX_BATCH); >> A comment explaining why is...
2017 Mar 22
2
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
...= 0; > + n->vqs[i].rh = 0; > } > > } > @@ -503,13 +512,30 @@ static void handle_tx(struct vhost_net *net) > mutex_unlock(&vq->mutex); > } > > -static int peek_head_len(struct sock *sk) > +static int peek_head_len_batched(struct vhost_net_virtqueue *rvq) Pls rename to say what it actually does: fetch skbs > +{ > + if (rvq->rh != rvq->rt) > + goto out; > + > + rvq->rh = rvq->rt = 0; > + rvq->rt = skb_array_consume_batched_bh(rvq->rx_array, rvq->rxq, > + VHOST_RX_BATCH); A comment explaining why is...
2017 Mar 22
2
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
...= 0; > + n->vqs[i].rh = 0; > } > > } > @@ -503,13 +512,30 @@ static void handle_tx(struct vhost_net *net) > mutex_unlock(&vq->mutex); > } > > -static int peek_head_len(struct sock *sk) > +static int peek_head_len_batched(struct vhost_net_virtqueue *rvq) Pls rename to say what it actually does: fetch skbs > +{ > + if (rvq->rh != rvq->rt) > + goto out; > + > + rvq->rh = rvq->rt = 0; > + rvq->rt = skb_array_consume_batched_bh(rvq->rx_array, rvq->rxq, > + VHOST_RX_BATCH); A comment explaining why is...
2018 Aug 01
2
[PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...> + } else if (unlikely(vhost_enable_notify(&net->dev, vq))) { > + vhost_disable_notify(&net->dev, vq); > + vhost_poll_queue(&vq->poll); > + } > +} > + > +static void vhost_net_busy_poll_check(struct vhost_net *net, > + struct vhost_virtqueue *rvq, > + struct vhost_virtqueue *tvq, > + bool rx) > +{ > + struct socket *sock = rvq->private_data; > + > + if (rx) > + vhost_net_busy_poll_try_queue(net, tvq); > + else if (sock && sk_has_rx_data(sock->sk)) > + vhost_net_busy_poll_try_queue...
2018 Aug 01
2
[PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...> + } else if (unlikely(vhost_enable_notify(&net->dev, vq))) { > + vhost_disable_notify(&net->dev, vq); > + vhost_poll_queue(&vq->poll); > + } > +} > + > +static void vhost_net_busy_poll_check(struct vhost_net *net, > + struct vhost_virtqueue *rvq, > + struct vhost_virtqueue *tvq, > + bool rx) > +{ > + struct socket *sock = rvq->private_data; > + > + if (rx) > + vhost_net_busy_poll_try_queue(net, tvq); > + else if (sock && sk_has_rx_data(sock->sk)) > + vhost_net_busy_poll_try_queue...
2018 Jun 20
1
[PATCH] net: vhost: improve performance when enable busyloop
...st_net *net, struct vhost_virtqueue *vq, struct iovec iov[], unsigned int iov_size, unsigned int *out_num, unsigned int *in_num) { unsigned long uninitialized_var(endtime); + struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_RX]; + struct vhost_virtqueue *rvq = &nvq->vq; + struct socket *sock = rvq->private_data; + int r = vhost_get_vq_desc(vq, vq->iov, ARRAY_SIZE(vq->iov), out_num, in_num, NULL, NULL); if (r == vq->num && vq->busyloop_timeout) { + mutex_lock_nested(&rvq->mutex, 1); + + vhost_disable_n...
2017 Mar 29
1
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
On 2017?03?29? 18:46, Pankaj Gupta wrote: > Hi Jason, > >> On 2017?03?23? 13:34, Jason Wang wrote: >>> >>>>> +{ >>>>> + if (rvq->rh != rvq->rt) >>>>> + goto out; >>>>> + >>>>> + rvq->rh = rvq->rt = 0; >>>>> + rvq->rt = skb_array_consume_batched_bh(rvq->rx_array, rvq->rxq, >>>>> + VHOST_RX_BATCH...
2017 Mar 29
1
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
On 2017?03?29? 18:46, Pankaj Gupta wrote: > Hi Jason, > >> On 2017?03?23? 13:34, Jason Wang wrote: >>> >>>>> +{ >>>>> + if (rvq->rh != rvq->rt) >>>>> + goto out; >>>>> + >>>>> + rvq->rh = rvq->rt = 0; >>>>> + rvq->rt = skb_array_consume_batched_bh(rvq->rx_array, rvq->rxq, >>>>> + VHOST_RX_BATCH...
2017 Mar 21
0
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
...n->vqs[i].sock_hlen = 0; + n->vqs[i].rt = 0; + n->vqs[i].rh = 0; } } @@ -503,13 +512,30 @@ static void handle_tx(struct vhost_net *net) mutex_unlock(&vq->mutex); } -static int peek_head_len(struct sock *sk) +static int peek_head_len_batched(struct vhost_net_virtqueue *rvq) +{ + if (rvq->rh != rvq->rt) + goto out; + + rvq->rh = rvq->rt = 0; + rvq->rt = skb_array_consume_batched_bh(rvq->rx_array, rvq->rxq, + VHOST_RX_BATCH); + if (!rvq->rt) + return 0; +out: + return __skb_array_len_with_tag(rvq->rxq[rvq->rh]); +} + +static int pee...
2018 Jul 21
0
[PATCH net-next v6 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...(struct sock *sk) +{ + struct socket *sock = sk->sk_socket; + + if (sock->ops->peek_len) + return sock->ops->peek_len(sock); + + return skb_queue_empty(&sk->sk_receive_queue); +} + +static void vhost_net_busy_poll_vq_check(struct vhost_net *net, + struct vhost_virtqueue *rvq, + struct vhost_virtqueue *tvq, + bool rx) +{ + struct socket *sock = rvq->private_data; + + if (rx) { + if (!vhost_vq_avail_empty(&net->dev, tvq)) { + vhost_poll_queue(&tvq->poll); + } else if (unlikely(vhost_enable_notify(&net->dev, tvq))) { + vhost_disable...
2018 Jul 03
2
[PATCH net-next v4 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...et *sock = sk->sk_socket; > + > + if (sock->ops->peek_len) > + return sock->ops->peek_len(sock); > + > + return skb_queue_empty(&sk->sk_receive_queue); > +} > + > +static void vhost_net_busy_poll(struct vhost_net *net, > + struct vhost_virtqueue *rvq, > + struct vhost_virtqueue *tvq, > + bool rx) > +{ > + unsigned long uninitialized_var(endtime); > + unsigned long busyloop_timeout; > + struct socket *sock; > + struct vhost_virtqueue *vq = rx ? tvq : rvq; > + > + mutex_lock_nested(&vq->mutex, rx ? VHOST_NE...
2018 Jul 03
2
[PATCH net-next v4 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...et *sock = sk->sk_socket; > + > + if (sock->ops->peek_len) > + return sock->ops->peek_len(sock); > + > + return skb_queue_empty(&sk->sk_receive_queue); > +} > + > +static void vhost_net_busy_poll(struct vhost_net *net, > + struct vhost_virtqueue *rvq, > + struct vhost_virtqueue *tvq, > + bool rx) > +{ > + unsigned long uninitialized_var(endtime); > + unsigned long busyloop_timeout; > + struct socket *sock; > + struct vhost_virtqueue *vq = rx ? tvq : rvq; > + > + mutex_lock_nested(&vq->mutex, rx ? VHOST_NE...
2017 Mar 29
2
[PATCH net-next 8/8] vhost_net: use lockless peeking for skb array during busy polling
...-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c > index 53f09f2..41153a3 100644 > --- a/drivers/vhost/net.c > +++ b/drivers/vhost/net.c > @@ -551,10 +551,13 @@ static int peek_head_len(struct vhost_net_virtqueue *rvq, struct sock *sk) > return len; > } > > -static int sk_has_rx_data(struct sock *sk) > +static int sk_has_rx_data(struct vhost_net_virtqueue *rvq, struct sock *sk) > { > struct socket *sock = sk->sk_socket; > > + if (rvq->rx_array) > + return !__skb_arr...
2017 Mar 29
2
[PATCH net-next 8/8] vhost_net: use lockless peeking for skb array during busy polling
...-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c > index 53f09f2..41153a3 100644 > --- a/drivers/vhost/net.c > +++ b/drivers/vhost/net.c > @@ -551,10 +551,13 @@ static int peek_head_len(struct vhost_net_virtqueue *rvq, struct sock *sk) > return len; > } > > -static int sk_has_rx_data(struct sock *sk) > +static int sk_has_rx_data(struct vhost_net_virtqueue *rvq, struct sock *sk) > { > struct socket *sock = sk->sk_socket; > > + if (rvq->rx_array) > + return !__skb_arr...
2018 Jul 02
1
[PATCH net-next v3 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...et *sock = sk->sk_socket; > + > + if (sock->ops->peek_len) > + return sock->ops->peek_len(sock); > + > + return skb_queue_empty(&sk->sk_receive_queue); > +} > + > +static void vhost_net_busy_poll(struct vhost_net *net, > + struct vhost_virtqueue *rvq, > + struct vhost_virtqueue *tvq, > + bool rx) > +{ > + unsigned long uninitialized_var(endtime); > + struct socket *sock = rvq->private_data; > + struct vhost_virtqueue *vq = rx ? tvq : rvq; > + unsigned long busyloop_timeout = rx ? rvq->busyloop_timeout : > +...