search for: vhost_rx_signal_us

Displaying 20 results from an estimated 34 matches for "vhost_rx_signal_us".

Did you mean: vhost_rx_signal_used
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_rx_signal_used(struct vhost_net_virtqueue *nvq) > { > struct vhost_virtqueue *vq = &nvq->vq; > @@ -645,39 +681,19 @@ static void vhost_rx_signal_used(struct vhost_net_virtqueue *nvq) > > static int vhost_net_rx_peek_head_len(struct vhost_net *net, struct sock *sk) > { > -...
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_rx_signal_used(struct vhost_net_virtqueue *nvq) > { > struct vhost_virtqueue *vq = &nvq->vq; > @@ -645,39 +681,19 @@ static void vhost_rx_signal_used(struct vhost_net_virtqueue *nvq) > > static int vhost_net_rx_peek_head_len(struct vhost_net *net, struct sock *sk) > { > -...
2018 May 29
2
[PATCH net] vhost_net: flush batched heads before trying to busy polling
...or DMA done zerocopy buffers + * For RX, number of batched heads + */ int done_idx; /* an array of userspace buffers info */ struct ubuf_info *ubuf_info; @@ -626,6 +628,18 @@ static int sk_has_rx_data(struct sock *sk) return skb_queue_empty(&sk->sk_receive_queue); } +static void vhost_rx_signal_used(struct vhost_net_virtqueue *nvq) +{ + struct vhost_virtqueue *vq = &nvq->vq; + struct vhost_dev *dev = vq->dev; + + if (!nvq->done_idx) + return; + + vhost_add_used_and_signal_n(dev, vq, vq->heads, nvq->done_idx); + nvq->done_idx = 0; +} + static int vhost_net_rx_peek_head...
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_rx_signal_used(struct vhost_net_virtqueue *nvq) > { > struct vhost_virtqueue *vq = &nvq->vq; > @@ -645,39 +679,19 @@ static void vhost_rx_signal_used(struct vhost_net_virtqueue *nvq) > > static int vhost_net_rx_peek_head_len(struct vhost_net *net, struct sock *sk) > { > -...
2018 Jul 03
1
[PATCH net-next v4 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...= 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_rx_signal_used(struct vhost_net_virtqueue *nvq) >>> { >>> struct vhost_virtqueue *vq = &nvq->vq; >>> @@ -645,39 +681,19 @@ static void vhost_rx_signal_used(struct vhost_net_virtqueue *nvq) >>> >>> static int vhost_net_rx_peek_head_len(struct vhost...
2018 Jul 02
5
[PATCH net-next v4 0/4] net: vhost: improve performance when enable busyloop
From: Tonghao Zhang <xiangxia.m.yue at gmail.com> This patches improve the guest receive and transmit performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. For more performance report, see patch 4. v3 -> v4: fix some issues v2 -> v3: This patches are splited from previous big patch:
2018 Jun 30
0
[PATCH net-next v3 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
..._net_virtqueue *rvq, struct sock *sk) return len; } -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_rx_signal_used(struct vhost_net_virtqueue *nvq) { struct vhost_virtqueue *vq = &nvq->vq; @@ -645,39 +679,19 @@ static void vhost_rx_signal_used(struct vhost_net_virtqueue *nvq) static int vhost_net_rx_peek_head_len(struct vhost_net *net, struct sock *sk) { - struct vhost_net_virtqueue *rvq = &...
2018 Jul 02
0
[PATCH net-next v4 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
..._net_virtqueue *rvq, struct sock *sk) return len; } -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_rx_signal_used(struct vhost_net_virtqueue *nvq) { struct vhost_virtqueue *vq = &nvq->vq; @@ -645,39 +681,19 @@ static void vhost_rx_signal_used(struct vhost_net_virtqueue *nvq) static int vhost_net_rx_peek_head_len(struct vhost_net *net, struct sock *sk) { - struct vhost_net_virtqueue *rvq = &...
2018 Jul 04
0
[PATCH net-next v5 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
..._net_virtqueue *rvq, struct sock *sk) return len; } -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_rx_signal_used(struct vhost_net_virtqueue *nvq) { struct vhost_virtqueue *vq = &nvq->vq; @@ -645,39 +681,19 @@ static void vhost_rx_signal_used(struct vhost_net_virtqueue *nvq) static int vhost_net_rx_peek_head_len(struct vhost_net *net, struct sock *sk) { - struct vhost_net_virtqueue *rvq = &...
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_rx_signal_used(struct vhost_net_virtqueue *nvq) > > { > > struct vhost_virtqueue *vq = &nvq->vq; > > @@ -645,39 +681,19 @@ static void vhost_rx_signal_used(struct vhost_net_virtqueue *nvq) > > > > static int vhost_net_rx_peek_head_len(struct vhost_net *net, struct...
2018 Jun 29
5
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...t->dev, vq))) { vhost_disable_notify(&net->dev, vq); continue; } break; } + vq->busyloop_endtime = 0; if (in) { vq_err(vq, "Unexpected descriptor format for TX: " "out %d, int %d\n", out, in); @@ -642,39 +658,51 @@ static void vhost_rx_signal_used(struct vhost_net_virtqueue *nvq) static int vhost_net_rx_peek_head_len(struct vhost_net *net, struct sock *sk) { - struct vhost_net_virtqueue *rvq = &net->vqs[VHOST_NET_VQ_RX]; - struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX]; - struct vhost_virtqueue *vq = &nv...
2018 Jun 29
5
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...t->dev, vq))) { vhost_disable_notify(&net->dev, vq); continue; } break; } + vq->busyloop_endtime = 0; if (in) { vq_err(vq, "Unexpected descriptor format for TX: " "out %d, int %d\n", out, in); @@ -642,39 +658,51 @@ static void vhost_rx_signal_used(struct vhost_net_virtqueue *nvq) static int vhost_net_rx_peek_head_len(struct vhost_net *net, struct sock *sk) { - struct vhost_net_virtqueue *rvq = &net->vqs[VHOST_NET_VQ_RX]; - struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX]; - struct vhost_virtqueue *vq = &nv...
2018 Jun 30
9
[PATCH net-next v3 0/4] net: vhost: improve performance when enable busyloop
From: Tonghao Zhang <xiangxia.m.yue at gmail.com> This patches improve the guest receive and transmit performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. This patches are splited from previous big patch: http://patchwork.ozlabs.org/patch/934673/ For more performance report, see patch 4. Tonghao Zhang (4): net: vhost:
2018 Jul 03
0
[PATCH v2 net-next 1/4] vhost_net: Rename local variables in vhost_net_rx_peek_head_len
...t.co.jp> --- drivers/vhost/net.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 29756d8..3939c50 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -647,39 +647,39 @@ static void vhost_rx_signal_used(struct vhost_net_virtqueue *nvq) static int vhost_net_rx_peek_head_len(struct vhost_net *net, struct sock *sk) { - struct vhost_net_virtqueue *rvq = &net->vqs[VHOST_NET_VQ_RX]; - struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX]; - struct vhost_virtqueue *vq = &nv...
2018 Jul 03
11
[PATCH v2 net-next 0/4] vhost_net: Avoid vq kicks during busyloop
Under heavy load vhost tx busypoll tend not to suppress vq kicks, which causes poor guest tx performance. The detailed scenario is described in commitlog of patch 2. Rx seems not to have that serious problem, but for consistency I made a similar change on rx to avoid rx wakeups (patch 3). Additionary patch 4 is to avoid rx kicks under heavy load during busypoll. Tx performance is greatly improved
2018 Jun 29
0
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...&net->dev, vq); > continue; > } > break; > } > + vq->busyloop_endtime = 0; > if (in) { > vq_err(vq, "Unexpected descriptor format for TX: " > "out %d, int %d\n", out, in); > @@ -642,39 +658,51 @@ static void vhost_rx_signal_used(struct vhost_net_virtqueue *nvq) > > static int vhost_net_rx_peek_head_len(struct vhost_net *net, struct sock *sk) > { > - struct vhost_net_virtqueue *rvq = &net->vqs[VHOST_NET_VQ_RX]; > - struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX]; > - struct...
2018 Jun 29
0
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...t->dev, vq); > continue; > } > break; > } > + vq->busyloop_endtime = 0; > if (in) { > vq_err(vq, "Unexpected descriptor format for TX: " > "out %d, int %d\n", out, in); > @@ -642,39 +658,51 @@ static void vhost_rx_signal_used(struct vhost_net_virtqueue *nvq) > > static int vhost_net_rx_peek_head_len(struct vhost_net *net, struct sock *sk) > { > - struct vhost_net_virtqueue *rvq = &net->vqs[VHOST_NET_VQ_RX]; > - struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX]; > - str...
2018 Jul 02
2
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...???????? break; >> ????????????? cpu_relax(); >> +??????? } >> ????????? preempt_enable(); >> ????????? r = vhost_get_vq_desc(vq, vq->iov, ARRAY_SIZE(vq->iov), >> ??????????????????????? out_num, in_num, NULL, NULL); ... >> @@ -642,39 +658,51 @@ static void vhost_rx_signal_used(struct >> vhost_net_virtqueue *nvq) >> ? ? static int vhost_net_rx_peek_head_len(struct vhost_net *net, >> struct sock *sk) >> ? { >> -??? struct vhost_net_virtqueue *rvq = &net->vqs[VHOST_NET_VQ_RX]; >> -??? struct vhost_net_virtqueue *nvq = &net-&g...
2018 Jul 02
2
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...???????? break; >> ????????????? cpu_relax(); >> +??????? } >> ????????? preempt_enable(); >> ????????? r = vhost_get_vq_desc(vq, vq->iov, ARRAY_SIZE(vq->iov), >> ??????????????????????? out_num, in_num, NULL, NULL); ... >> @@ -642,39 +658,51 @@ static void vhost_rx_signal_used(struct >> vhost_net_virtqueue *nvq) >> ? ? static int vhost_net_rx_peek_head_len(struct vhost_net *net, >> struct sock *sk) >> ? { >> -??? struct vhost_net_virtqueue *rvq = &net->vqs[VHOST_NET_VQ_RX]; >> -??? struct vhost_net_virtqueue *nvq = &net-&g...
2018 Jul 04
8
[PATCH net-next v5 0/4] net: vhost: improve performance when enable busyloop
From: Tonghao Zhang <xiangxia.m.yue at gmail.com> This patches improve the guest receive and transmit performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. For more performance report, see patch 4. v4 -> v5: fix some issues v3 -> v4: fix some issues v2 -> v3: This patches are splited from previous big patch: