search for: vhost_net_batch

Displaying 20 results from an estimated 67 matches for "vhost_net_batch".

2020 Jul 20
0
[PATCH RFC v8 02/11] vhost: use batched get_vq_desc version
...(would indicate one of the code changes > > > > affects performance in an unexpected way). > > > > > > > > -- > > > > MST > > > > > > > > > > Hi! > > > > > > Varying batch_size as drivers/vhost/net.c:VHOST_NET_BATCH, > > > > sorry this is not what I meant. > > > > I mean something like this: > > > > > > diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c > > index 0b509be8d7b1..b94680e5721d 100644 > > --- a/drivers/vhost/net.c > > +++ b/drivers...
2020 Jul 21
0
[PATCH RFC v8 02/11] vhost: use batched get_vq_desc version
...too aggressive) >>>> or not (would indicate one of the code changes >>>> affects performance in an unexpected way). >>>> >>>> -- >>>> MST >>>> >>> Hi! >>> >>> Varying batch_size as drivers/vhost/net.c:VHOST_NET_BATCH, >> sorry this is not what I meant. >> >> I mean something like this: >> >> >> diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c >> index 0b509be8d7b1..b94680e5721d 100644 >> --- a/drivers/vhost/net.c >> +++ b/drivers/vhost/net.c >> @...
2020 Jul 20
0
[PATCH RFC v8 02/11] vhost: use batched get_vq_desc version
...rmance as without batching > > (would indicate 64 is too aggressive) > > or not (would indicate one of the code changes > > affects performance in an unexpected way). > > > > -- > > MST > > > > Hi! > > Varying batch_size as drivers/vhost/net.c:VHOST_NET_BATCH, sorry this is not what I meant. I mean something like this: diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 0b509be8d7b1..b94680e5721d 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -1279,6 +1279,10 @@ static void handle_rx_net(struct vhost_work *work) handle_rx(n...
2018 Sep 06
2
[PATCH net-next 11/11] vhost_net: batch submitting XDP buffers to underlayer sockets
...8 at 12:05:26PM +0800, Jason Wang wrote: > This patch implements XDP batching for vhost_net. The idea is first to > try to do userspace copy and build XDP buff directly in vhost. Instead > of submitting the packet immediately, vhost_net will batch them in an > array and submit every 64 (VHOST_NET_BATCH) packets to the under layer > sockets through msg_control of sendmsg(). > > When XDP is enabled on the TUN/TAP, TUN/TAP can process XDP inside a > loop without caring GUP thus it can do batch map flushing. When XDP is > not enabled or not supported, the underlayer socket need to bui...
2018 Sep 06
2
[PATCH net-next 11/11] vhost_net: batch submitting XDP buffers to underlayer sockets
...8 at 12:05:26PM +0800, Jason Wang wrote: > This patch implements XDP batching for vhost_net. The idea is first to > try to do userspace copy and build XDP buff directly in vhost. Instead > of submitting the packet immediately, vhost_net will batch them in an > array and submit every 64 (VHOST_NET_BATCH) packets to the under layer > sockets through msg_control of sendmsg(). > > When XDP is enabled on the TUN/TAP, TUN/TAP can process XDP inside a > loop without caring GUP thus it can do batch map flushing. When XDP is > not enabled or not supported, the underlayer socket need to bui...
2018 Sep 06
0
[PATCH net-next 11/11] vhost_net: batch submitting XDP buffers to underlayer sockets
This patch implements XDP batching for vhost_net. The idea is first to try to do userspace copy and build XDP buff directly in vhost. Instead of submitting the packet immediately, vhost_net will batch them in an array and submit every 64 (VHOST_NET_BATCH) packets to the under layer sockets through msg_control of sendmsg(). When XDP is enabled on the TUN/TAP, TUN/TAP can process XDP inside a loop without caring GUP thus it can do batch map flushing. When XDP is not enabled or not supported, the underlayer socket need to build skb and pass it to net...
2018 Jul 20
12
[PATCH net-next 0/9] TX used ring batched updating for vhost
...helper to initialize tx iov iter vhost_net: introduce vhost_exceeds_weight() vhost_net: introduce get_tx_bufs() vhost_net: introduce tx_can_batch() vhost_net: split out datacopy logic vhost_net: rename vhost_rx_signal_used() to vhost_net_signal_used() vhost_net: rename VHOST_RX_BATCH to VHOST_NET_BATCH vhost_net: batch update used ring for datacopy TX drivers/vhost/net.c | 249 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 179 insertions(+), 70 deletions(-) -- 2.7.4
2018 Jul 20
12
[PATCH net-next 0/9] TX used ring batched updating for vhost
...helper to initialize tx iov iter vhost_net: introduce vhost_exceeds_weight() vhost_net: introduce get_tx_bufs() vhost_net: introduce tx_can_batch() vhost_net: split out datacopy logic vhost_net: rename vhost_rx_signal_used() to vhost_net_signal_used() vhost_net: rename VHOST_RX_BATCH to VHOST_NET_BATCH vhost_net: batch update used ring for datacopy TX drivers/vhost/net.c | 249 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 179 insertions(+), 70 deletions(-) -- 2.7.4
2018 Sep 12
0
[PATCH net-next V2 11/11] vhost_net: batch submitting XDP buffers to underlayer sockets
This patch implements XDP batching for vhost_net. The idea is first to try to do userspace copy and build XDP buff directly in vhost. Instead of submitting the packet immediately, vhost_net will batch them in an array and submit every 64 (VHOST_NET_BATCH) packets to the under layer sockets through msg_control of sendmsg(). When XDP is enabled on the TUN/TAP, TUN/TAP can process XDP inside a loop without caring GUP thus it can do batch map flushing. When XDP is not enabled or not supported, the underlayer socket need to build skb and pass it to net...
2018 Sep 07
0
[PATCH net-next 11/11] vhost_net: batch submitting XDP buffers to underlayer sockets
...+0800, Jason Wang wrote: >> This patch implements XDP batching for vhost_net. The idea is first to >> try to do userspace copy and build XDP buff directly in vhost. Instead >> of submitting the packet immediately, vhost_net will batch them in an >> array and submit every 64 (VHOST_NET_BATCH) packets to the under layer >> sockets through msg_control of sendmsg(). >> >> When XDP is enabled on the TUN/TAP, TUN/TAP can process XDP inside a >> loop without caring GUP thus it can do batch map flushing. When XDP is >> not enabled or not supported, the underlayer...
2020 Jul 20
0
[PATCH RFC v8 02/11] vhost: use batched get_vq_desc version
...get same performance as without batching >> (would indicate 64 is too aggressive) >> or not (would indicate one of the code changes >> affects performance in an unexpected way). >> >> -- >> MST >> > Hi! > > Varying batch_size as drivers/vhost/net.c:VHOST_NET_BATCH, Did you mean varying the value of VHOST_NET_BATCH itself or the number of batched descriptors? > and testing > the pps as previous mail says. This means that we have either only > vhost_net batching (in base testing, like previously to apply this > patch) or both batching sizes th...
2018 Sep 07
1
[PATCH net-next 11/11] vhost_net: batch submitting XDP buffers to underlayer sockets
...> The name is misleading, it means whether we can do batching. For simplicity, > I disable batching is sndbuf is not INT_MAX. But what does batching have to do with sndbuf? > > > for (;;) { > > > bool busyloop_intr = false; > > > + if (nvq->done_idx == VHOST_NET_BATCH) > > > + vhost_tx_batch(net, nvq, sock, &msg); > > > + > > > head = get_tx_bufs(net, nvq, &msg, &out, &in, &len, > > > &busyloop_intr); > > > /* On error, stop handling until the next kick. */ > > > @@...
2017 Sep 22
17
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
...d 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 changed, 270 insertions(+), 125 deletions(-) -- 2.7.4
2017 Sep 22
17
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
...d 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 changed, 270 insertions(+), 125 deletions(-) -- 2.7.4
2017 Sep 27
2
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
...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 +++++++++++++++++++++++++++++++------ >> drivers/vhost/vhost.h | 9 ++ >> 3 files c...
2017 Sep 27
2
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
...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 +++++++++++++++++++++++++++++++------ >> drivers/vhost/vhost.h | 9 ++ >> 3 files c...
2017 Sep 28
1
[PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing
> @@ -461,6 +460,7 @@ static void handle_tx(struct vhost_net *net) > struct socket *sock; > struct vhost_net_ubuf_ref *uninitialized_var(ubufs); > bool zcopy, zcopy_used; > + int i, batched = VHOST_NET_BATCH; > > mutex_lock(&vq->mutex); > sock = vq->private_data; > @@ -475,6 +475,12 @@ static void handle_tx(struct vhost_net *net) > hdr_size = nvq->vhost_hlen; > zcopy = nvq->ubufs; > > + /* Disable zerocopy batched fetching fo...
2017 Sep 28
1
[PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing
> @@ -461,6 +460,7 @@ static void handle_tx(struct vhost_net *net) > struct socket *sock; > struct vhost_net_ubuf_ref *uninitialized_var(ubufs); > bool zcopy, zcopy_used; > + int i, batched = VHOST_NET_BATCH; > > mutex_lock(&vq->mutex); > sock = vq->private_data; > @@ -475,6 +475,12 @@ static void handle_tx(struct vhost_net *net) > hdr_size = nvq->vhost_hlen; > zcopy = nvq->ubufs; > > + /* Disable zerocopy batched fetching fo...
2019 May 16
6
[PATCH net 0/4] Prevent vhost kthread from hogging CPU
Hi: This series try to prvernt a guest triggerable CPU hogging through vhost kthread. This is done by introducing and checking the weight after each requrest. The patch has been tested with reproducer of vsock and virtio-net. Only compile test is done for vhost-scsi. Please review. This addresses CVE-2019-3900. Jason Wang (4): vhost: introduce vhost_exceeds_weight() vhost_net: fix possible
2019 May 17
0
[PATCH V2 1/4] vhost: introduce vhost_exceeds_weight()
...))) goto out; - } } if (unlikely(busyloop_intr)) vhost_poll_queue(&vq->poll); @@ -1338,7 +1327,8 @@ static int vhost_net_open(struct inode *inode, struct file *f) vhost_net_buf_init(&n->vqs[i].rxq); } vhost_dev_init(dev, vqs, VHOST_NET_VQ_MAX, - UIO_MAXIOV + VHOST_NET_BATCH); + UIO_MAXIOV + VHOST_NET_BATCH, + VHOST_NET_WEIGHT, VHOST_NET_PKT_WEIGHT); vhost_poll_init(n->poll + VHOST_NET_VQ_TX, handle_tx_net, EPOLLOUT, dev); vhost_poll_init(n->poll + VHOST_NET_VQ_RX, handle_rx_net, EPOLLIN, dev); diff --git a/drivers/vhost/scsi.c b/drivers/vho...