search for: waitqueu

Displaying 20 results from an estimated 227 matches for "waitqueu".

Did you mean: waitqueue
2013 Jul 22
3
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...t; >>> port = filp->private_data; >> >>> + if (!port->guest_connected) { >> >>> + /* Port was unplugged before we could proceed */ >> >>> + return POLLHUP; >> >>> + } >> >>> poll_wait(filp, &port->waitqueue, wait); >> >>> >> >>> if (!port->guest_connected) { >> >> Looks still racy here. Unlike port_fops_read() which check >> >> will_read_block(). If unplug happens after the check but before the >> >> poll_wait(), caller will be...
2013 Jul 22
3
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...t; >>> port = filp->private_data; >> >>> + if (!port->guest_connected) { >> >>> + /* Port was unplugged before we could proceed */ >> >>> + return POLLHUP; >> >>> + } >> >>> poll_wait(filp, &port->waitqueue, wait); >> >>> >> >>> if (!port->guest_connected) { >> >> Looks still racy here. Unlike port_fops_read() which check >> >> will_read_block(). If unplug happens after the check but before the >> >> poll_wait(), caller will be...
2013 Jul 23
1
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...rivate_data; >>>>>>> + if (!port->guest_connected) { >>>>>>> + /* Port was unplugged before we could proceed */ >>>>>>> + return POLLHUP; >>>>>>> + } >>>>>>> poll_wait(filp, &port->waitqueue, wait); >>>>>>> >>>>>>> if (!port->guest_connected) { >>>>>> Looks still racy here. Unlike port_fops_read() which check >>>>>> will_read_block(). If unplug happens after the check but before the >>>>&g...
2013 Jul 23
1
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...rivate_data; >>>>>>> + if (!port->guest_connected) { >>>>>>> + /* Port was unplugged before we could proceed */ >>>>>>> + return POLLHUP; >>>>>>> + } >>>>>>> poll_wait(filp, &port->waitqueue, wait); >>>>>>> >>>>>>> if (!port->guest_connected) { >>>>>> Looks still racy here. Unlike port_fops_read() which check >>>>>> will_read_block(). If unplug happens after the check but before the >>>>&g...
2013 Jul 19
2
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...>>> unsigned int ret; >>> >>> port = filp->private_data; >>> + if (!port->guest_connected) { >>> + /* Port was unplugged before we could proceed */ >>> + return POLLHUP; >>> + } >>> poll_wait(filp, &port->waitqueue, wait); >>> >>> if (!port->guest_connected) { >> Looks still racy here. Unlike port_fops_read() which check >> will_read_block(). If unplug happens after the check but before the >> poll_wait(), caller will be blocked forever. > unplug_port() calls wak...
2013 Jul 19
2
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...>>> unsigned int ret; >>> >>> port = filp->private_data; >>> + if (!port->guest_connected) { >>> + /* Port was unplugged before we could proceed */ >>> + return POLLHUP; >>> + } >>> poll_wait(filp, &port->waitqueue, wait); >>> >>> if (!port->guest_connected) { >> Looks still racy here. Unlike port_fops_read() which check >> will_read_block(). If unplug happens after the check but before the >> poll_wait(), caller will be blocked forever. > unplug_port() calls wak...
2013 Jul 23
0
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...port = filp->private_data; >>>>>> + if (!port->guest_connected) { >>>>>> + /* Port was unplugged before we could proceed */ >>>>>> + return POLLHUP; >>>>>> + } >>>>>> poll_wait(filp, &port->waitqueue, wait); >>>>>> >>>>>> if (!port->guest_connected) { >>>>> Looks still racy here. Unlike port_fops_read() which check >>>>> will_read_block(). If unplug happens after the check but before the >>>>> poll_wait(),...
2013 Jul 19
2
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...nsigned int port_fops_poll(struct file *filp, poll_table *wait) > unsigned int ret; > > port = filp->private_data; > + if (!port->guest_connected) { > + /* Port was unplugged before we could proceed */ > + return POLLHUP; > + } > poll_wait(filp, &port->waitqueue, wait); > > if (!port->guest_connected) { Looks still racy here. Unlike port_fops_read() which check will_read_block(). If unplug happens after the check but before the poll_wait(), caller will be blocked forever.
2013 Jul 19
2
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...nsigned int port_fops_poll(struct file *filp, poll_table *wait) > unsigned int ret; > > port = filp->private_data; > + if (!port->guest_connected) { > + /* Port was unplugged before we could proceed */ > + return POLLHUP; > + } > poll_wait(filp, &port->waitqueue, wait); > > if (!port->guest_connected) { Looks still racy here. Unlike port_fops_read() which check will_read_block(). If unplug happens after the check but before the poll_wait(), caller will be blocked forever.
2011 Nov 08
48
Need help with fixing the Xen waitqueue feature
The patch ''mem_event: use wait queue when ring is full'' I just sent out makes use of the waitqueue feature. There are two issues I get with the change applied: I think I got the logic right, and in my testing vcpu->pause_count drops to zero in p2m_mem_paging_resume(). But for some reason the vcpu does not make progress after the first wakeup. In my debugging there is one wakeup, the ring is...
2013 Jul 19
0
[PATCH 06/10] virtio: console: fix race in port_fops_poll() and port unplug
...t; >>> > >>> port = filp->private_data; > >>> + if (!port->guest_connected) { > >>> + /* Port was unplugged before we could proceed */ > >>> + return POLLHUP; > >>> + } > >>> poll_wait(filp, &port->waitqueue, wait); > >>> > >>> if (!port->guest_connected) { > >> Looks still racy here. Unlike port_fops_read() which check > >> will_read_block(). If unplug happens after the check but before the > >> poll_wait(), caller will be blocked forever. &gt...
2016 May 30
1
[PATCH V2 2/2] vhost_net: conditionally enable tx polling
On Mon, May 30, 2016 at 02:47:54AM -0400, Jason Wang wrote: > We always poll tx for socket, this is sub optimal since: > > - it will be only used when we exceed the sndbuf of the socket. > - since we use two independent polls for tx and vq, this will slightly > increase the waitqueue traversing time and more important, vhost > could not benefit from commit > 9e641bdcfa4ef4d6e2fbaa59c1be0ad5d1551fd5 ("net-tun: restructure > tun_do_read for better sleep/wakeup efficiency") even if we've > stopped rx polling during handle_rx since tx poll were st...
2016 May 30
1
[PATCH V2 2/2] vhost_net: conditionally enable tx polling
On Mon, May 30, 2016 at 02:47:54AM -0400, Jason Wang wrote: > We always poll tx for socket, this is sub optimal since: > > - it will be only used when we exceed the sndbuf of the socket. > - since we use two independent polls for tx and vq, this will slightly > increase the waitqueue traversing time and more important, vhost > could not benefit from commit > 9e641bdcfa4ef4d6e2fbaa59c1be0ad5d1551fd5 ("net-tun: restructure > tun_do_read for better sleep/wakeup efficiency") even if we've > stopped rx polling during handle_rx since tx poll were st...
2017 Oct 31
2
[PATCH net-next] vhost_net: conditionally enable tx polling
We always poll tx for socket, this is sub optimal since: - we only want to be notified when sndbuf is available - this will slightly increase the waitqueue traversing time and more important, vhost could not benefit from commit commit 9e641bdcfa4e ("net-tun: restructure tun_do_read for better sleep/wakeup efficiency") even if we've stopped rx polling during handle_rx() since tx poll were still left in the waitqueue. Pktgen fr...
2017 Oct 31
2
[PATCH net-next] vhost_net: conditionally enable tx polling
We always poll tx for socket, this is sub optimal since: - we only want to be notified when sndbuf is available - this will slightly increase the waitqueue traversing time and more important, vhost could not benefit from commit commit 9e641bdcfa4e ("net-tun: restructure tun_do_read for better sleep/wakeup efficiency") even if we've stopped rx polling during handle_rx() since tx poll were still left in the waitqueue. Pktgen fr...
2016 Jun 07
1
[PATCH V3 2/2] vhost_net: conditionally enable tx polling
On Wed, Jun 01, 2016 at 01:56:34AM -0400, Jason Wang wrote: > We always poll tx for socket, this is sub optimal since: > > - it will be only used when we exceed the sndbuf of the socket. > - since we use two independent polls for tx and vq, this will slightly > increase the waitqueue traversing time and more important, vhost > could not benefit from commit > 9e641bdcfa4ef4d6e2fbaa59c1be0ad5d1551fd5 ("net-tun: restructure > tun_do_read for better sleep/wakeup efficiency") even if we've > stopped rx polling during handle_rx since tx poll were st...
2016 Jun 07
1
[PATCH V3 2/2] vhost_net: conditionally enable tx polling
On Wed, Jun 01, 2016 at 01:56:34AM -0400, Jason Wang wrote: > We always poll tx for socket, this is sub optimal since: > > - it will be only used when we exceed the sndbuf of the socket. > - since we use two independent polls for tx and vq, this will slightly > increase the waitqueue traversing time and more important, vhost > could not benefit from commit > 9e641bdcfa4ef4d6e2fbaa59c1be0ad5d1551fd5 ("net-tun: restructure > tun_do_read for better sleep/wakeup efficiency") even if we've > stopped rx polling during handle_rx since tx poll were st...
2018 Mar 27
4
[PATCH net V2] vhost: correctly remove wait queue during poll failure
We tried to remove vq poll from wait queue, but do not check whether or not it was in a list before. This will lead double free. Fixing this by switching to use vhost_poll_stop() which zeros poll->wqh after removing poll from waitqueue to make sure it won't be freed twice. Cc: Darren Kenny <darren.kenny at oracle.com> Reported-by: syzbot+c0272972b01b872e604a at syzkaller.appspotmail.com Fixes: 2b8b328b61c79 ("vhost_net: handle polling errors when setting backend") Signed-off-by: Jason Wang <jasowang at re...
2018 Mar 27
4
[PATCH net V2] vhost: correctly remove wait queue during poll failure
We tried to remove vq poll from wait queue, but do not check whether or not it was in a list before. This will lead double free. Fixing this by switching to use vhost_poll_stop() which zeros poll->wqh after removing poll from waitqueue to make sure it won't be freed twice. Cc: Darren Kenny <darren.kenny at oracle.com> Reported-by: syzbot+c0272972b01b872e604a at syzkaller.appspotmail.com Fixes: 2b8b328b61c79 ("vhost_net: handle polling errors when setting backend") Signed-off-by: Jason Wang <jasowang at re...
2014 Oct 20
4
[PATCH v4 13/25] virtio_console: enable VQs early
...85b47..6ebe8f6 100644 > > > --- a/drivers/char/virtio_console.c > > > +++ b/drivers/char/virtio_console.c > > > @@ -1449,6 +1449,8 @@ static int add_port(struct ports_device *portdev, u32 id) > > > spin_lock_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); > >...