search for: fill_queu

Displaying 20 results from an estimated 104 matches for "fill_queu".

Did you mean: fill_queue
2019 Nov 13
2
[PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed
...ased when virtconsole is removed (see a7a69ec0d8e4) To avoid the problem and to be symmetric, we could allocate all the buffers in init_vqs() as they are released in remove_vqs(), but it sounds like a waste of memory. Rather than that, this patch changes add_port() logic to ignore ENOSPC error in fill_queue(), which means queue has already been filled. Fixes: a7a69ec0d8e4 ("virtio_console: free buffers after reset") Cc: mst at redhat.com Cc: stable at vger.kernel.org Signed-off-by: Laurent Vivier <lvivier at redhat.com> --- Notes: v2: making fill_queue return int and testing ret...
2019 Nov 13
2
[PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed
...ased when virtconsole is removed (see a7a69ec0d8e4) To avoid the problem and to be symmetric, we could allocate all the buffers in init_vqs() as they are released in remove_vqs(), but it sounds like a waste of memory. Rather than that, this patch changes add_port() logic to ignore ENOSPC error in fill_queue(), which means queue has already been filled. Fixes: a7a69ec0d8e4 ("virtio_console: free buffers after reset") Cc: mst at redhat.com Cc: stable at vger.kernel.org Signed-off-by: Laurent Vivier <lvivier at redhat.com> --- Notes: v2: making fill_queue return int and testing ret...
2019 Nov 14
3
[PATCH v3] virtio_console: allocate inbufs in add_port() only if it is needed
...ased when virtconsole is removed (see a7a69ec0d8e4) To avoid the problem and to be symmetric, we could allocate all the buffers in init_vqs() as they are released in remove_vqs(), but it sounds like a waste of memory. Rather than that, this patch changes add_port() logic to ignore ENOSPC error in fill_queue(), which means queue has already been filled. Fixes: a7a69ec0d8e4 ("virtio_console: free buffers after reset") Cc: mst at redhat.com Cc: stable at vger.kernel.org Signed-off-by: Laurent Vivier <lvivier at redhat.com> --- Notes: v3: add a comment about ENOSPC error v2: mak...
2019 Nov 14
3
[PATCH v3] virtio_console: allocate inbufs in add_port() only if it is needed
...ased when virtconsole is removed (see a7a69ec0d8e4) To avoid the problem and to be symmetric, we could allocate all the buffers in init_vqs() as they are released in remove_vqs(), but it sounds like a waste of memory. Rather than that, this patch changes add_port() logic to ignore ENOSPC error in fill_queue(), which means queue has already been filled. Fixes: a7a69ec0d8e4 ("virtio_console: free buffers after reset") Cc: mst at redhat.com Cc: stable at vger.kernel.org Signed-off-by: Laurent Vivier <lvivier at redhat.com> --- Notes: v3: add a comment about ENOSPC error v2: mak...
2019 Nov 13
2
[PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed
...t; To avoid the problem and to be symmetric, we could allocate all the buffers > > in init_vqs() as they are released in remove_vqs(), but it sounds like > > a waste of memory. > > > > Rather than that, this patch changes add_port() logic to ignore ENOSPC > > error in fill_queue(), which means queue has already been filled. > > > > Fixes: a7a69ec0d8e4 ("virtio_console: free buffers after reset") > > Cc: mst at redhat.com > > Cc: stable at vger.kernel.org > > Signed-off-by: Laurent Vivier <lvivier at redhat.com> > > ---...
2019 Nov 13
2
[PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed
...t; To avoid the problem and to be symmetric, we could allocate all the buffers > > in init_vqs() as they are released in remove_vqs(), but it sounds like > > a waste of memory. > > > > Rather than that, this patch changes add_port() logic to ignore ENOSPC > > error in fill_queue(), which means queue has already been filled. > > > > Fixes: a7a69ec0d8e4 ("virtio_console: free buffers after reset") > > Cc: mst at redhat.com > > Cc: stable at vger.kernel.org > > Signed-off-by: Laurent Vivier <lvivier at redhat.com> > > ---...
2019 Nov 06
3
[PATCH] virtio_console: allocate inbufs in add_port() only if it is needed
...421,12 +1421,17 @@ static int add_port(struct ports_device *portdev, u32 id) >> spin_lock_init(&port->outvq_lock); >> init_waitqueue_head(&port->waitqueue); >> >> - /* Fill the in_vq with buffers so the host can send us data. */ >> - nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock); >> - if (!nr_added_bufs) { >> - dev_err(port->dev, "Error allocating inbufs\n"); >> - err = -ENOMEM; >> - goto free_device; >> + /* if the in_vq has not already been filled (the port has already been >>...
2019 Nov 06
3
[PATCH] virtio_console: allocate inbufs in add_port() only if it is needed
...421,12 +1421,17 @@ static int add_port(struct ports_device *portdev, u32 id) >> spin_lock_init(&port->outvq_lock); >> init_waitqueue_head(&port->waitqueue); >> >> - /* Fill the in_vq with buffers so the host can send us data. */ >> - nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock); >> - if (!nr_added_bufs) { >> - dev_err(port->dev, "Error allocating inbufs\n"); >> - err = -ENOMEM; >> - goto free_device; >> + /* if the in_vq has not already been filled (the port has already been >>...
2019 Nov 13
0
[PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed
...ee a7a69ec0d8e4) > > To avoid the problem and to be symmetric, we could allocate all the buffers > in init_vqs() as they are released in remove_vqs(), but it sounds like > a waste of memory. > > Rather than that, this patch changes add_port() logic to ignore ENOSPC > error in fill_queue(), which means queue has already been filled. > > Fixes: a7a69ec0d8e4 ("virtio_console: free buffers after reset") > Cc: mst at redhat.com > Cc: stable at vger.kernel.org > Signed-off-by: Laurent Vivier <lvivier at redhat.com> > --- > > Notes: > v2:...
2019 Dec 03
0
[PATCH v3] virtio_console: allocate inbufs in add_port() only if it is needed
...) > > To avoid the problem and to be symmetric, we could allocate all the > buffers > in init_vqs() as they are released in remove_vqs(), but it sounds > like > a waste of memory. > > Rather than that, this patch changes add_port() logic to ignore > ENOSPC > error in fill_queue(), which means queue has already been filled. > > Fixes: a7a69ec0d8e4 ("virtio_console: free buffers after reset") > Cc: mst at redhat.com > Cc: stable at vger.kernel.org > Signed-off-by: Laurent Vivier <lvivier at redhat.com> Reviewed-by: Amit Shah <amit at ker...
2019 Dec 03
1
[PATCH v3] virtio_console: allocate inbufs in add_port() only if it is needed
...be symmetric, we could allocate all the > > buffers > > in init_vqs() as they are released in remove_vqs(), but it sounds > > like > > a waste of memory. > > > > Rather than that, this patch changes add_port() logic to ignore > > ENOSPC > > error in fill_queue(), which means queue has already been filled. > > > > Fixes: a7a69ec0d8e4 ("virtio_console: free buffers after reset") > > Cc: mst at redhat.com > > Cc: stable at vger.kernel.org > > Signed-off-by: Laurent Vivier <lvivier at redhat.com> > > Rev...
2019 Oct 18
3
[PATCH] virtio_console: allocate inbufs in add_port() only if it is needed
...e.c +++ b/drivers/char/virtio_console.c @@ -1421,12 +1421,17 @@ static int add_port(struct ports_device *portdev, u32 id) spin_lock_init(&port->outvq_lock); init_waitqueue_head(&port->waitqueue); - /* Fill the in_vq with buffers so the host can send us data. */ - nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock); - if (!nr_added_bufs) { - dev_err(port->dev, "Error allocating inbufs\n"); - err = -ENOMEM; - goto free_device; + /* if the in_vq has not already been filled (the port has already been + * used and unplugged), fill the in_vq with buffers...
2019 Oct 18
3
[PATCH] virtio_console: allocate inbufs in add_port() only if it is needed
...e.c +++ b/drivers/char/virtio_console.c @@ -1421,12 +1421,17 @@ static int add_port(struct ports_device *portdev, u32 id) spin_lock_init(&port->outvq_lock); init_waitqueue_head(&port->waitqueue); - /* Fill the in_vq with buffers so the host can send us data. */ - nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock); - if (!nr_added_bufs) { - dev_err(port->dev, "Error allocating inbufs\n"); - err = -ENOMEM; - goto free_device; + /* if the in_vq has not already been filled (the port has already been + * used and unplugged), fill the in_vq with buffers...
2013 Mar 29
3
[PATCH v2 0/2] virtio: console: add locking around control out-vq
The in-vq operations were protected by a lock, but the out-vq operations were not. This caused panics / errors as described in patch 2. Fix that. The first patch renames the existing cvq_lock to c_ivq_lock to match c_ivq. The second patch introduces the c_ovq_lock for the c_ovq. Please apply. I also believe this is a candidate for stable. v2: * Use spin_lock instead of spin_lock_irq.
2013 Mar 29
3
[PATCH v2 0/2] virtio: console: add locking around control out-vq
The in-vq operations were protected by a lock, but the out-vq operations were not. This caused panics / errors as described in patch 2. Fix that. The first patch renames the existing cvq_lock to c_ivq_lock to match c_ivq. The second patch introduces the c_ovq_lock for the c_ovq. Please apply. I also believe this is a candidate for stable. v2: * Use spin_lock instead of spin_lock_irq.
2019 Nov 13
0
[PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed
...e problem and to be symmetric, we could allocate all the buffers >>> in init_vqs() as they are released in remove_vqs(), but it sounds like >>> a waste of memory. >>> >>> Rather than that, this patch changes add_port() logic to ignore ENOSPC >>> error in fill_queue(), which means queue has already been filled. >>> >>> Fixes: a7a69ec0d8e4 ("virtio_console: free buffers after reset") >>> Cc: mst at redhat.com >>> Cc: stable at vger.kernel.org >>> Signed-off-by: Laurent Vivier <lvivier at redhat.com>...
2019 Nov 06
0
[PATCH] virtio_console: allocate inbufs in add_port() only if it is needed
...int add_port(struct ports_device *portdev, u32 id) > >> spin_lock_init(&port->outvq_lock); > >> init_waitqueue_head(&port->waitqueue); > >> > >> - /* Fill the in_vq with buffers so the host can send us data. */ > >> - nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock); > >> - if (!nr_added_bufs) { > >> - dev_err(port->dev, "Error allocating inbufs\n"); > >> - err = -ENOMEM; > >> - goto free_device; > >> + /* if the in_vq has not already been filled (the port h...
2014 Oct 20
4
[PATCH v4 13/25] virtio_console: enable VQs early
..._init(&port->outvq_lock); > > > init_waitqueue_head(&port->waitqueue); > > > > > > + virtio_device_ready(portdev->vdev); > > > + > > > /* Fill the in_vq with buffers so the host can send us data. */ > > > nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock); > > > if (!nr_added_bufs) { > > > > Seems like probe and add_port() now both set VIRTIO_CONFIG_S_DRIVER_OK > > I think we need to set this in the probe function instead, otherwise we > fail for multiqueue (which also want...
2014 Oct 20
4
[PATCH v4 13/25] virtio_console: enable VQs early
..._init(&port->outvq_lock); > > > init_waitqueue_head(&port->waitqueue); > > > > > > + virtio_device_ready(portdev->vdev); > > > + > > > /* Fill the in_vq with buffers so the host can send us data. */ > > > nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock); > > > if (!nr_added_bufs) { > > > > Seems like probe and add_port() now both set VIRTIO_CONFIG_S_DRIVER_OK > > I think we need to set this in the probe function instead, otherwise we > fail for multiqueue (which also want...
2013 Mar 28
5
[PATCH 0/2] virtio: console: add locking around control out-vq
The in-vq operations were protected by a lock, but the out-vq operations were not. This caused panics / errors as described in patch 2. Fix that. The first patch renames the existing cvq_lock to c_ivq_lock to match c_ivq. The second patch introduces the c_ovq_lock for the c_ovq. Please apply. I also believe this is a candidate for stable. Amit Shah (2): virtio: console: rename cvq_lock