search for: vhost_net_busy_pol

Displaying 20 results from an estimated 99 matches for "vhost_net_busy_pol".

Did you mean: vhost_net_busy_poll
2018 Jul 04
1
[PATCH net-next v5 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
On Wed, Jul 4, 2018 at 5:18 PM Jason Wang <jasowang at redhat.com> wrote: > > > > On 2018?07?04? 15:59, Toshiaki Makita wrote: > > On 2018/07/04 13:31, xiangxia.m.yue at gmail.com wrote: > > ... > >> +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); &...
2018 Jul 04
2
[PATCH net-next v5 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
On 2018/07/04 13:31, xiangxia.m.yue at gmail.com wrote: ... > +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; &g...
2018 Jul 04
2
[PATCH net-next v5 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
On 2018/07/04 13:31, xiangxia.m.yue at gmail.com wrote: ... > +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; &g...
2018 Dec 12
0
[PATCH net V2 2/4] vhost_net: switch to use mutex_trylock() in vhost_net_busy_poll()
We used to hold the mutex of paired virtqueue in vhost_net_busy_poll(). But this will results an inconsistent lock order which may cause deadlock if we try to bring back the protection of device IOTLB with vq mutex that requires to hold mutex of all virtqueues at the same time. Fix this simply by switching to use mutex_trylock(), when fail just skip the busy polli...
2018 Aug 03
1
[PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...for sock rx. >>>>> so the network is broken. >>>> Not sure I understand here. I mean is we schedule work for handle_rx(), >>>> there's no need to enable it since handle_rx() will do this for us. >>> Looks like in the last "else" block in vhost_net_busy_poll_check() we >>> need to enable vq since in that case we have no rx data and handle_rx() >>> is not scheduled. >>> > Rethink about this, looks not. We enable rx wakeups in this case, so if > there's pending data, handle_rx() will be schedule after > vhost_net_...
2018 Aug 03
0
[PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...ason Wang <jasowang at redhat.com> wrote: > >> > >> > >> On 2018?08?02? 16:41, Toshiaki Makita wrote: > >>> On 2018/08/02 17:18, Jason Wang wrote: > >>>> On 2018?08?01? 17:52, Tonghao Zhang wrote: > >>>>>> +static void vhost_net_busy_poll_check(struct vhost_net *net, > >>>>>> + struct vhost_virtqueue *rvq, > >>>>>> + struct vhost_virtqueue *tvq, > >>>>>> + bool rx) >...
2018 Aug 03
3
[PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...Thu, Aug 2, 2018 at 5:23 PM Jason Wang <jasowang at redhat.com> wrote: >> >> >> On 2018?08?02? 16:41, Toshiaki Makita wrote: >>> On 2018/08/02 17:18, Jason Wang wrote: >>>> On 2018?08?01? 17:52, Tonghao Zhang wrote: >>>>>> +static void vhost_net_busy_poll_check(struct vhost_net *net, >>>>>> + struct vhost_virtqueue *rvq, >>>>>> + struct vhost_virtqueue *tvq, >>>>>> + bool rx) >>>>&gt...
2018 Aug 03
3
[PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...Thu, Aug 2, 2018 at 5:23 PM Jason Wang <jasowang at redhat.com> wrote: >> >> >> On 2018?08?02? 16:41, Toshiaki Makita wrote: >>> On 2018/08/02 17:18, Jason Wang wrote: >>>> On 2018?08?01? 17:52, Tonghao Zhang wrote: >>>>>> +static void vhost_net_busy_poll_check(struct vhost_net *net, >>>>>> + struct vhost_virtqueue *rvq, >>>>>> + struct vhost_virtqueue *tvq, >>>>>> + bool rx) >>>>&gt...
2018 Aug 03
0
[PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...Wang <jasowang at redhat.com> wrote: > >>>> On 2018?08?02? 16:41, Toshiaki Makita wrote: > >>>>> On 2018/08/02 17:18, Jason Wang wrote: > >>>>>> On 2018?08?01? 17:52, Tonghao Zhang wrote: > >>>>>>>> +static void vhost_net_busy_poll_check(struct vhost_net *net, > >>>>>>>> + struct vhost_virtqueue *rvq, > >>>>>>>> + struct vhost_virtqueue *tvq, > >>>>>>>> +...
2018 Jun 30
0
[PATCH net-next v3 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...*n, return vhost_poll_start(poll, sock->file); } +static int sk_has_rx_data(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(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->busyl...
2018 Jul 02
0
[PATCH net-next v4 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...*n, return vhost_poll_start(poll, sock->file); } +static int sk_has_rx_data(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(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, r...
2018 Jul 04
0
[PATCH net-next v5 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...*n, return vhost_poll_start(poll, sock->file); } +static int sk_has_rx_data(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(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, r...
2018 Aug 03
0
[PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...redhat.com> wrote: > >>>> > >>>> On 2018?08?02? 16:41, Toshiaki Makita wrote: > >>>>> On 2018/08/02 17:18, Jason Wang wrote: > >>>>>> On 2018?08?01? 17:52, Tonghao Zhang wrote: > >>>>>>>> +static void vhost_net_busy_poll_check(struct vhost_net *net, > >>>>>>>> + struct vhost_virtqueue *rvq, > >>>>>>>> + struct vhost_virtqueue *tvq, > >>>>>>>> +...
2018 Jul 21
0
[PATCH net-next v6 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...*n, return vhost_poll_start(poll, sock->file); } +static int sk_has_rx_data(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 (unlik...
2018 Jul 04
0
[PATCH net-next v5 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
On 2018?07?04? 15:59, Toshiaki Makita wrote: > On 2018/07/04 13:31, xiangxia.m.yue at gmail.com wrote: > ... >> +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_vi...
2018 Jul 03
0
[PATCH net-next v4 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...+ 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(struct vhost_net *net, > > + struct vhost_virtqueue *rvq, > > + struct vhost_virtqueue *tvq, > > + bool rx) > > +{ > > + unsigned long uninitialized_var(endtime); > > + u...
2018 Sep 09
0
[PATCH net-next v8 3/7] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...and will be > > used for in tx path in the next patch. And with the patch, > > qemu can set differently the busyloop_timeout for rx queue. > > > > To avoid duplicate codes, introduce the helper functions: > > * sock_has_rx_data(changed from sk_has_rx_data) > > * vhost_net_busy_poll_try_queue > > > > Signed-off-by: Tonghao Zhang <xiangxia.m.yue at gmail.com> > > --- > > drivers/vhost/net.c | 111 +++++++++++++++++++++++++++++++++------------------- > > 1 file changed, 71 insertions(+), 40 deletions(-) > > > > diff --git a/dri...
2018 Aug 01
0
[PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...t vhost_net_virtqueue *nvq) nvq->done_idx = 0; } +static int sk_has_rx_data(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_try_queue(struct vhost_net *net, + struct vhost_virtqueue *vq) +{ + if (!vhost_vq_avail_empty(&net->dev, vq)) { + vhost_poll_queue(&vq->poll); + } else if (unlikely(vhost_enable_notify(&net->dev, vq))) { + vhost_disable_notify(&net->dev, vq); + vhost_poll_queue...
2018 Jul 02
1
[PATCH net-next v3 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...> +static int sk_has_rx_data(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(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 lo...
2018 Jul 03
2
[PATCH net-next v4 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...> +static int sk_has_rx_data(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(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; &g...