search for: nhead

Displaying 20 results from an estimated 53 matches for "nhead".

Did you mean: head
2017 Feb 10
1
[virtio-dev] packed ring layout proposal v2
...we > > want to. > > The reason is that it allows indices to be free running. Well what I meant is that with qsize not a power of 2 you can still do this but have to do everything mod N*qsize as opposed to mod 2^16. So you need a branch there - easiest to do if you do signed math. int nheads = avail - last_avail; /*Check and handle index wrap-around */ if (unlikely(nheads < 0)) { nheads += N_qsize; } if (nheads < 0 || nheads > vdev->vq[i].vring.num) { error_report(...); return -1; } This can only catch bugs if N > 1 > This is an > example of QEMU code that...
2017 Feb 10
1
[virtio-dev] packed ring layout proposal v2
...we > > want to. > > The reason is that it allows indices to be free running. Well what I meant is that with qsize not a power of 2 you can still do this but have to do everything mod N*qsize as opposed to mod 2^16. So you need a branch there - easiest to do if you do signed math. int nheads = avail - last_avail; /*Check and handle index wrap-around */ if (unlikely(nheads < 0)) { nheads += N_qsize; } if (nheads < 0 || nheads > vdev->vq[i].vring.num) { error_report(...); return -1; } This can only catch bugs if N > 1 > This is an > example of QEMU code that...
2018 May 21
0
[RFC PATCH net-next 12/12] vhost_net: batch submitting XDP buffers to underlayer sockets
...- struct xdp_buff xdp; unsigned out, in; int head; struct msghdr msg = { @@ -586,7 +613,6 @@ static void handle_tx_copy(struct vhost_net *net) size_t hdr_size; struct socket *sock; struct vhost_net_ubuf_ref *uninitialized_var(ubufs); - struct tun_msg_ctl ctl; int sent_pkts = 0; s16 nheads = 0; @@ -631,22 +657,24 @@ static void handle_tx_copy(struct vhost_net *net) vq->heads[nheads].id = cpu_to_vhost32(vq, head); vq->heads[nheads].len = 0; - err = vhost_net_build_xdp(nvq, &msg.msg_iter, &xdp); - if (!err) { - ctl.type = TUN_MSG_PTR; - ctl.ptr = &xdp...
2018 May 29
2
[PATCH net] vhost_net: flush batched heads before trying to busy polling
...ost_rx_signal_used(rvq); /* Both tx vq and rx socket were polled here */ mutex_lock_nested(&vq->mutex, 1); vhost_disable_notify(&net->dev, vq); @@ -762,7 +778,7 @@ static void handle_rx(struct vhost_net *net) }; size_t total_len = 0; int err, mergeable; - s16 headcount, nheads = 0; + s16 headcount; size_t vhost_hlen, sock_hlen; size_t vhost_len, sock_len; struct socket *sock; @@ -790,8 +806,8 @@ static void handle_rx(struct vhost_net *net) while ((sock_len = vhost_net_rx_peek_head_len(net, sock->sk))) { sock_len += sock_hlen; vhost_len = sock_len + vhos...
2017 Feb 09
2
[virtio-dev] packed ring layout proposal v2
On Thu, Feb 09, 2017 at 04:48:53PM +0100, Paolo Bonzini wrote: > > > On 08/02/2017 20:59, Michael S. Tsirkin wrote: > > We couldn't decide what's better for everyone in 1.0 days and I doubt > > we'll be able to now, but yes, benchmarking is needed to make > > sire it's required. Very easy to remove or not to use/support in > > drivers/devices
2017 Feb 09
2
[virtio-dev] packed ring layout proposal v2
On Thu, Feb 09, 2017 at 04:48:53PM +0100, Paolo Bonzini wrote: > > > On 08/02/2017 20:59, Michael S. Tsirkin wrote: > > We couldn't decide what's better for everyone in 1.0 days and I doubt > > we'll be able to now, but yes, benchmarking is needed to make > > sire it's required. Very easy to remove or not to use/support in > > drivers/devices
2018 Jan 09
2
[PATCH net-next] vhost_net: batch used ring update in rx
...eletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index c7bdeb6..988af72 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -744,7 +744,7 @@ static void handle_rx(struct vhost_net *net) }; size_t total_len = 0; int err, mergeable; - s16 headcount; + s16 headcount, nheads = 0; size_t vhost_hlen, sock_hlen; size_t vhost_len, sock_len; struct socket *sock; @@ -772,7 +772,7 @@ static void handle_rx(struct vhost_net *net) while ((sock_len = vhost_net_rx_peek_head_len(net, sock->sk))) { sock_len += sock_hlen; vhost_len = sock_len + vhost_hlen; - headco...
2018 May 21
20
[RFC PATCH net-next 00/12] XDP batching for TUN/vhost_net
Hi all: We do not support XDP batching for TUN since it can only receive one packet a time from vhost_net. This series tries to remove this limitation by: - introduce a TUN specific msg_control that can hold a pointer to an array of XDP buffs - try copy and build XDP buff in vhost_net - store XDP buffs in an array and submit them once for every N packets from vhost_net - since TUN can only
2017 Feb 10
0
[virtio-dev] packed ring layout proposal v2
...> I thought originally there's a reason 1.0 rings had to be powers of two > but now I don't see why. OK, we can make it a feature flag later if we > want to. The reason is that it allows indices to be free running. This is an example of QEMU code that requires that: nheads = vring_avail_idx(&vdev->vq[i]) - vdev->vq[i].last_avail_idx; /* Check it isn't doing strange things with descriptor numbers. */ if (nheads > vdev->vq[i].vring.num) { error_report("VQ %d size 0x%x Guest index 0x%x "...
2019 Jul 17
17
[PATCH V3 00/15] Packed virtqueue support for vhost
Hi all: This series implements packed virtqueues which were described at [1]. In this version we try to address the performance regression saw by V2. The root cause is packed virtqueue need more times of userspace memory accesssing which turns out to be very expensive. Thanks to the help of 7f466032dc9e ("vhost: access vq metadata through kernel virtual address"), such overhead cold be
2019 Jul 17
17
[PATCH V3 00/15] Packed virtqueue support for vhost
Hi all: This series implements packed virtqueues which were described at [1]. In this version we try to address the performance regression saw by V2. The root cause is packed virtqueue need more times of userspace memory accesssing which turns out to be very expensive. Thanks to the help of 7f466032dc9e ("vhost: access vq metadata through kernel virtual address"), such overhead cold be
2017 Sep 22
1
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
...wing variable names are a little confusing: last_avail_idx vs vq->last_avail_idx. last_avail_idx is a wrapped avail->ring[] index, vq->last_avail_idx is a free-running counter. The same for last_used_idx vs vq->last_used_idx. num argument vs vq->num. The argument could be called nheads instead to make it clear that this is heads[] and not the virtqueue size. Not a bug but it took me a while to figure out what was going on.
2017 Sep 22
1
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
...wing variable names are a little confusing: last_avail_idx vs vq->last_avail_idx. last_avail_idx is a wrapped avail->ring[] index, vq->last_avail_idx is a free-running counter. The same for last_used_idx vs vq->last_used_idx. num argument vs vq->num. The argument could be called nheads instead to make it clear that this is heads[] and not the virtqueue size. Not a bug but it took me a while to figure out what was going on.
2004 Jun 18
0
Asterisk does not start when cdr_odbc ist configured
...libesoracle.so Setup = /usr/local/easysoft/oracle/libesoraclesetup.so FileUsage = 3 When i try to set autoload=no in modules.conf and then load the module cdr_odbc.so with cli this happens: asterisk -vvr == Parsing '/etc/asterisk/asterisk.conf': Found Asterisk CVS-NHEAD-06/09/04-16:25:34, Copyright (C) 1999-2004 Digium. Written by Mark Spencer <markster@digium.com> ========================================================== Connected to Asterisk CVS-NHEAD-06/09/04-16:25:34 currently running on ospbx1 (pid = 1033) ospbx1*CLI> load cdr_odbc.so ospbx1*CLI>...
2005 May 13
1
Help needed on setting up realtime
I installed Asterisk CVS-NHEAD-05/13/05-01:59:30 and placed few call in and through successfully. I was trying to set up the Realtime - picking the sip.conf and extensions.conf from mysql. I was going through some wiki pages, but what i don't understand is - which configuration change makes asterisk stop looking at extension...
2014 Dec 03
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
On Tue, 2 Dec 2014 21:03:45 +0200 "Michael S. Tsirkin" <mst at redhat.com> wrote: > On Tue, Dec 02, 2014 at 04:41:36PM +0100, Cornelia Huck wrote: > > void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) > > { > > + /* > > + * For virtio-1 devices, the number of buffers may only be > > + * updated if the ring addresses have
2014 Dec 03
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
On Tue, 2 Dec 2014 21:03:45 +0200 "Michael S. Tsirkin" <mst at redhat.com> wrote: > On Tue, Dec 02, 2014 at 04:41:36PM +0100, Cornelia Huck wrote: > > void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) > > { > > + /* > > + * For virtio-1 devices, the number of buffers may only be > > + * updated if the ring addresses have
2012 Sep 24
20
cannot replace X with Y: devices have different sector alignment
Well this is a new one.... Illumos/Openindiana let me add a device as a hot spare that evidently has a different sector alignment than all of the other drives in the array. So now I''m at the point that I /need/ a hot spare and it doesn''t look like I have it. And, worse, the other spares I have are all the same model as said hot spare. Is there anything I can do with this or
2018 Apr 23
0
[RFC V3 PATCH 1/8] vhost: move get_rx_bufs to vhost.c
...RCU. */ static void handle_rx(struct vhost_net *net) @@ -790,9 +713,9 @@ static void handle_rx(struct vhost_net *net) while ((sock_len = vhost_net_rx_peek_head_len(net, sock->sk))) { sock_len += sock_hlen; vhost_len = sock_len + vhost_hlen; - headcount = get_rx_bufs(vq, vq->heads + nheads, vhost_len, - &in, vq_log, &log, - likely(mergeable) ? UIO_MAXIOV : 1); + headcount = vhost_get_bufs(vq, vq->heads + nheads, vhost_len, + &in, vq_log, &log, + likely(mergeable) ? UIO_MAXIOV : 1); /* On error, stop handling until the next kick. */ if...
2014 Dec 11
0
[PATCH RFC v6 07/20] virtio: allow virtio-1 queue layout
..."inconsistent with Host index 0x%x", @@ -1084,7 +1099,7 @@ int virtio_load(VirtIODevice *vdev, QEMUFile *f, int version_id) } for (i = 0; i < num; i++) { - if (vdev->vq[i].pa) { + if (vdev->vq[i].vring.desc) { uint16_t nheads; nheads = vring_avail_idx(&vdev->vq[i]) - vdev->vq[i].last_avail_idx; /* Check it isn't doing strange things with descriptor numbers. */ diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 68c40db..b63ced3 100644 --- a/include/hw/virti...