search for: vhost_net_tx_select_zcopy

Displaying 20 results from an estimated 56 matches for "vhost_net_tx_select_zcopy".

2013 Sep 04
2
[PATCH V3 4/6] vhost_net: determine whether or not to use zerocopy at one time
...x Thinking about this, this looks strange. The original idea was that once we start doing zcopy, we keep using the heads ring even for short packets until no zcopy is outstanding. What's the logic behind (nvq->upend_idx + 1) % UIO_MAXIOV != nvq->done_idx here? > + && vhost_net_tx_select_zcopy(net); > > /* use msg_control to pass vhost zerocopy ubuf info to skb */ > if (zcopy_used) { > + struct ubuf_info *ubuf; > + ubuf = nvq->ubuf_info + nvq->upend_idx; > + > vq->heads[nvq->upend_idx].id = head; > - if (!vhost_net_tx_select_zcopy(net...
2013 Sep 04
2
[PATCH V3 4/6] vhost_net: determine whether or not to use zerocopy at one time
...x Thinking about this, this looks strange. The original idea was that once we start doing zcopy, we keep using the heads ring even for short packets until no zcopy is outstanding. What's the logic behind (nvq->upend_idx + 1) % UIO_MAXIOV != nvq->done_idx here? > + && vhost_net_tx_select_zcopy(net); > > /* use msg_control to pass vhost zerocopy ubuf info to skb */ > if (zcopy_used) { > + struct ubuf_info *ubuf; > + ubuf = nvq->ubuf_info + nvq->upend_idx; > + > vq->heads[nvq->upend_idx].id = head; > - if (!vhost_net_tx_select_zcopy(net...
2013 Aug 30
0
[PATCH V2 4/6] vhost_net: determine whether or not to use zerocopy at one time
...s), hdr_size); break; } - zcopy_used = zcopy && (len >= VHOST_GOODCOPY_LEN || - nvq->upend_idx != nvq->done_idx); + + zcopy_used = zcopy && len >= VHOST_GOODCOPY_LEN + && (nvq->upend_idx + 1) % UIO_MAXIOV != nvq->done_idx + && vhost_net_tx_select_zcopy(net); /* use msg_control to pass vhost zerocopy ubuf info to skb */ if (zcopy_used) { + struct ubuf_info *ubuf; + ubuf = nvq->ubuf_info + nvq->upend_idx; + vq->heads[nvq->upend_idx].id = head; - if (!vhost_net_tx_select_zcopy(net) || - len < VHOST_GOODCOPY_LEN...
2013 Sep 02
0
[PATCH V3 4/6] vhost_net: determine whether or not to use zerocopy at one time
...break; } - zcopy_used = zcopy && (len >= VHOST_GOODCOPY_LEN || - nvq->upend_idx != nvq->done_idx); + + zcopy_used = zcopy && len >= VHOST_GOODCOPY_LEN + && (nvq->upend_idx + 1) % UIO_MAXIOV != + nvq->done_idx + && vhost_net_tx_select_zcopy(net); /* use msg_control to pass vhost zerocopy ubuf info to skb */ if (zcopy_used) { + struct ubuf_info *ubuf; + ubuf = nvq->ubuf_info + nvq->upend_idx; + vq->heads[nvq->upend_idx].id = head; - if (!vhost_net_tx_select_zcopy(net) || - len < VHOST_GOODCOPY_LEN...
2013 Sep 05
0
[PATCH V3 4/6] vhost_net: determine whether or not to use zerocopy at one time
...heads ring? > > What's the logic behind (nvq->upend_idx + 1) % UIO_MAXIOV != nvq->done_idx > here? Because we initialize both upend_idx and done_idx to zero, so upend_idx != done_idx could not be used to check whether or not the heads ring were full. >> + && vhost_net_tx_select_zcopy(net); >> >> /* use msg_control to pass vhost zerocopy ubuf info to skb */ >> if (zcopy_used) { >> + struct ubuf_info *ubuf; >> + ubuf = nvq->ubuf_info + nvq->upend_idx; >> + >> vq->heads[nvq->upend_idx].id = head; >> - if...
2013 Aug 30
1
[PATCH V2 4/6] vhost_net: determine whether or not to use zerocopy at one time
...> - zcopy_used = zcopy && (len >= VHOST_GOODCOPY_LEN || > - nvq->upend_idx != nvq->done_idx); > + > + zcopy_used = zcopy && len >= VHOST_GOODCOPY_LEN > + && (nvq->upend_idx + 1) % UIO_MAXIOV != nvq->done_idx > + && vhost_net_tx_select_zcopy(net); Could you leave && on a first of two lines, matching the previous style? > > /* use msg_control to pass vhost zerocopy ubuf info to skb */ > if (zcopy_used) { > + struct ubuf_info *ubuf; > + ubuf = nvq->ubuf_info + nvq->upend_idx; > + >...
2013 Aug 30
1
[PATCH V2 4/6] vhost_net: determine whether or not to use zerocopy at one time
...> - zcopy_used = zcopy && (len >= VHOST_GOODCOPY_LEN || > - nvq->upend_idx != nvq->done_idx); > + > + zcopy_used = zcopy && len >= VHOST_GOODCOPY_LEN > + && (nvq->upend_idx + 1) % UIO_MAXIOV != nvq->done_idx > + && vhost_net_tx_select_zcopy(net); Could you leave && on a first of two lines, matching the previous style? > > /* use msg_control to pass vhost zerocopy ubuf info to skb */ > if (zcopy_used) { > + struct ubuf_info *ubuf; > + ubuf = nvq->ubuf_info + nvq->upend_idx; > + >...
2018 May 21
0
[RFC PATCH net-next 04/12] vhost_net: split out datacopy logic
...ost_net_tx_get_vq_desc(net, vq, vq->iov, ARRAY_SIZE(vq->iov), @@ -559,9 +642,9 @@ static void handle_tx(struct vhost_net *net) if (len < 0) break; - zcopy_used = zcopy && len >= VHOST_GOODCOPY_LEN - && !vhost_exceeds_maxpend(net) - && vhost_net_tx_select_zcopy(net); + zcopy_used = len >= VHOST_GOODCOPY_LEN + && !vhost_exceeds_maxpend(net) + && vhost_net_tx_select_zcopy(net); /* use msg_control to pass vhost zerocopy ubuf info to skb */ if (zcopy_used) { @@ -620,6 +703,16 @@ static void handle_tx(struct vhost_net...
2013 Sep 02
8
[PATCH V3 0/6] vhost code cleanup and minor enhancement
This series tries to unify and simplify vhost codes especially for zerocopy. With this series, 5% - 10% improvement for per cpu throughput were seen during netperf guest sending test. Plase review. Changes from V2: - Typo fixes and code style fix - Add performance gain in the commit log of patch 2/6 - Retest the update the result in patch 6/6 Changes from V1: - Fix the zerocopy enabling check
2013 Sep 02
8
[PATCH V3 0/6] vhost code cleanup and minor enhancement
This series tries to unify and simplify vhost codes especially for zerocopy. With this series, 5% - 10% improvement for per cpu throughput were seen during netperf guest sending test. Plase review. Changes from V2: - Typo fixes and code style fix - Add performance gain in the commit log of patch 2/6 - Retest the update the result in patch 6/6 Changes from V1: - Fix the zerocopy enabling check
2018 Jul 02
2
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...n be used. What I'm not sure and >> was going to narrow down is why zerocopy is mostly not applied. >> > > I see, any touch to the zerocopy packet (clone, header expansion or > segmentation) that lead a userspace copy will increase the error counter > in vhost_net. Then vhost_net_tx_select_zcopy() may choose not to use > zerocopy. So it was probably something in your setup or a bug somewhere. Thanks for the hint! -- Toshiaki Makita
2018 Jul 02
2
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...n be used. What I'm not sure and >> was going to narrow down is why zerocopy is mostly not applied. >> > > I see, any touch to the zerocopy packet (clone, header expansion or > segmentation) that lead a userspace copy will increase the error counter > in vhost_net. Then vhost_net_tx_select_zcopy() may choose not to use > zerocopy. So it was probably something in your setup or a bug somewhere. Thanks for the hint! -- Toshiaki Makita
2017 Sep 30
2
[PATCH net-next] vhost_net: do not stall on zerocopy depletion
...% of packets are copied. Some zerocopy packets from vhost_net fail this test in tun.c if (iov_iter_npages(&i, INT_MAX) <= MAX_SKB_FRAGS) Generating packets with up to 21 frags. I'm not sure yet why or what the fraction of these packets is. But this in turn can disable zcopy_used in vhost_net_tx_select_zcopy for a larger share of packets: return !net->tx_flush && net->tx_packets / 64 >= net->tx_zcopy_err; Because the number of copied and zerocopy packets are the same before and after the patch, so are the overall throughput numbers.
2017 Sep 30
2
[PATCH net-next] vhost_net: do not stall on zerocopy depletion
...% of packets are copied. Some zerocopy packets from vhost_net fail this test in tun.c if (iov_iter_npages(&i, INT_MAX) <= MAX_SKB_FRAGS) Generating packets with up to 21 frags. I'm not sure yet why or what the fraction of these packets is. But this in turn can disable zcopy_used in vhost_net_tx_select_zcopy for a larger share of packets: return !net->tx_flush && net->tx_packets / 64 >= net->tx_zcopy_err; Because the number of copied and zerocopy packets are the same before and after the patch, so are the overall throughput numbers.
2017 Sep 28
9
[PATCH net-next] vhost_net: do not stall on zerocopy depletion
...@@ static void handle_tx(struct vhost_net *net) len = msg_data_left(&msg); zcopy_used = zcopy && len >= VHOST_GOODCOPY_LEN - && (nvq->upend_idx + 1) % UIO_MAXIOV != - nvq->done_idx + && !vhost_exceeds_maxpend(net) && vhost_net_tx_select_zcopy(net); /* use msg_control to pass vhost zerocopy ubuf info to skb */ -- 2.14.2.822.g60be5d43e6-goog
2017 Sep 28
9
[PATCH net-next] vhost_net: do not stall on zerocopy depletion
...@@ static void handle_tx(struct vhost_net *net) len = msg_data_left(&msg); zcopy_used = zcopy && len >= VHOST_GOODCOPY_LEN - && (nvq->upend_idx + 1) % UIO_MAXIOV != - nvq->done_idx + && !vhost_exceeds_maxpend(net) && vhost_net_tx_select_zcopy(net); /* use msg_control to pass vhost zerocopy ubuf info to skb */ -- 2.14.2.822.g60be5d43e6-goog
2014 Feb 25
2
[PATCH net] vhost: net: switch to use data copy if pending DMAs exceed the limit
...ne_idx) : + (nvq->upend_idx + UIO_MAXIOV - + nvq->done_idx); + zcopy_used = zcopy && len >= VHOST_GOODCOPY_LEN - && (nvq->upend_idx + 1) % UIO_MAXIOV != - nvq->done_idx + && num_pends <= VHOST_MAX_PEND && vhost_net_tx_select_zcopy(net); /* use msg_control to pass vhost zerocopy ubuf info to skb */ -- 1.8.3.2
2014 Feb 25
2
[PATCH net] vhost: net: switch to use data copy if pending DMAs exceed the limit
...ne_idx) : + (nvq->upend_idx + UIO_MAXIOV - + nvq->done_idx); + zcopy_used = zcopy && len >= VHOST_GOODCOPY_LEN - && (nvq->upend_idx + 1) % UIO_MAXIOV != - nvq->done_idx + && num_pends <= VHOST_MAX_PEND && vhost_net_tx_select_zcopy(net); /* use msg_control to pass vhost zerocopy ubuf info to skb */ -- 1.8.3.2
2013 Sep 23
2
[PATCH V3 4/6] vhost_net: determine whether or not to use zerocopy at one time
...V != nvq->done_idx > > here? > > Because we initialize both upend_idx and done_idx to zero, so upend_idx > != done_idx could not be used to check whether or not the heads ring > were full. But what does ring full have to do with zerocopy use? > >> + && vhost_net_tx_select_zcopy(net); > >> > >> /* use msg_control to pass vhost zerocopy ubuf info to skb */ > >> if (zcopy_used) { > >> + struct ubuf_info *ubuf; > >> + ubuf = nvq->ubuf_info + nvq->upend_idx; > >> + > >> vq->heads[nvq->up...
2013 Sep 23
2
[PATCH V3 4/6] vhost_net: determine whether or not to use zerocopy at one time
...V != nvq->done_idx > > here? > > Because we initialize both upend_idx and done_idx to zero, so upend_idx > != done_idx could not be used to check whether or not the heads ring > were full. But what does ring full have to do with zerocopy use? > >> + && vhost_net_tx_select_zcopy(net); > >> > >> /* use msg_control to pass vhost zerocopy ubuf info to skb */ > >> if (zcopy_used) { > >> + struct ubuf_info *ubuf; > >> + ubuf = nvq->ubuf_info + nvq->upend_idx; > >> + > >> vq->heads[nvq->up...