Displaying 20 results from an estimated 445 matches for "wait_ev".
Did you mean:
wait_key
2018 Apr 03
3
[PATCH] drm/virtio: fix vq wait_event condition
...rtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -293,7 +293,7 @@ static int virtio_gpu_queue_ctrl_buffer_locked(struct virtio_gpu_device *vgdev,
ret = virtqueue_add_sgs(vq, sgs, outcnt, incnt, vbuf, GFP_ATOMIC);
if (ret == -ENOSPC) {
spin_unlock(&vgdev->ctrlq.qlock);
- wait_event(vgdev->ctrlq.ack_queue, vq->num_free);
+ wait_event(vgdev->ctrlq.ack_queue, vq->num_free >= outcnt + incnt);
spin_lock(&vgdev->ctrlq.qlock);
goto retry;
} else {
@@ -368,7 +368,7 @@ static int virtio_gpu_queue_cursor(struct virtio_gpu_device *vgdev,
ret = virtque...
2018 Apr 03
3
[PATCH] drm/virtio: fix vq wait_event condition
...rtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -293,7 +293,7 @@ static int virtio_gpu_queue_ctrl_buffer_locked(struct virtio_gpu_device *vgdev,
ret = virtqueue_add_sgs(vq, sgs, outcnt, incnt, vbuf, GFP_ATOMIC);
if (ret == -ENOSPC) {
spin_unlock(&vgdev->ctrlq.qlock);
- wait_event(vgdev->ctrlq.ack_queue, vq->num_free);
+ wait_event(vgdev->ctrlq.ack_queue, vq->num_free >= outcnt + incnt);
spin_lock(&vgdev->ctrlq.qlock);
goto retry;
} else {
@@ -368,7 +368,7 @@ static int virtio_gpu_queue_cursor(struct virtio_gpu_device *vgdev,
ret = virtque...
2018 Apr 20
0
[PATCH] drm/virtio: fix vq wait_event condition
...rivers/gpu/drm/virtio/virtgpu_vq.c
> @@ -293,7 +293,7 @@ static int virtio_gpu_queue_ctrl_buffer_locked(struct virtio_gpu_device *vgdev,
> ret = virtqueue_add_sgs(vq, sgs, outcnt, incnt, vbuf, GFP_ATOMIC);
> if (ret == -ENOSPC) {
> spin_unlock(&vgdev->ctrlq.qlock);
> - wait_event(vgdev->ctrlq.ack_queue, vq->num_free);
> + wait_event(vgdev->ctrlq.ack_queue, vq->num_free >= outcnt + incnt);
> spin_lock(&vgdev->ctrlq.qlock);
> goto retry;
> } else {
> @@ -368,7 +368,7 @@ static int virtio_gpu_queue_cursor(struct virtio_gpu_devic...
2011 Feb 11
1
[PATCH 2/3]: Staging: hv: Use native wait primitives
...;msg;
openMsg->header.msgtype = CHANNELMSG_OPENCHANNEL;
@@ -280,8 +278,15 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
goto Cleanup;
}
- /* FIXME: Need to time-out here */
- osd_waitevent_wait(openInfo->waitevent);
+ openInfo->wait_condition = 0;
+ wait_event_timeout(openInfo->waitevent,
+ openInfo->wait_condition,
+ msecs_to_jiffies(1000));
+ if (openInfo->wait_condition == 0) {
+ err = -ETIMEDOUT;
+ goto errorout;
+ }
+
if (openInfo->response.open_result.status == 0)
DPRINT_INFO(VMBUS, "channel <%p> open success!...
2011 Feb 11
1
[PATCH 2/3]: Staging: hv: Use native wait primitives
...;msg;
openMsg->header.msgtype = CHANNELMSG_OPENCHANNEL;
@@ -280,8 +278,15 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
goto Cleanup;
}
- /* FIXME: Need to time-out here */
- osd_waitevent_wait(openInfo->waitevent);
+ openInfo->wait_condition = 0;
+ wait_event_timeout(openInfo->waitevent,
+ openInfo->wait_condition,
+ msecs_to_jiffies(1000));
+ if (openInfo->wait_condition == 0) {
+ err = -ETIMEDOUT;
+ goto errorout;
+ }
+
if (openInfo->response.open_result.status == 0)
DPRINT_INFO(VMBUS, "channel <%p> open success!...
2011 Feb 11
0
[PATCH 3/3]:Staging: hv: Remove osd layer
...aitevent *wait = kmalloc(sizeof(struct osd_waitevent),
- GFP_KERNEL);
- if (!wait)
- return NULL;
-
- wait->condition = 0;
- init_waitqueue_head(&wait->event);
- return wait;
-}
-EXPORT_SYMBOL_GPL(osd_waitevent_create);
-
-
-/**
- * osd_waitevent_set() - Wake up the process
- * @wait_event: Structure to event to be woken up
- *
- * @wait_event is of type &struct osd_waitevent
- *
- * Wake up the sleeping process so it can do some work.
- * And set condition indicator in &struct osd_waitevent to indicate
- * the process is in a woken state.
- *
- * Only used by Network and...
2011 Feb 11
0
[PATCH 3/3]:Staging: hv: Remove osd layer
...aitevent *wait = kmalloc(sizeof(struct osd_waitevent),
- GFP_KERNEL);
- if (!wait)
- return NULL;
-
- wait->condition = 0;
- init_waitqueue_head(&wait->event);
- return wait;
-}
-EXPORT_SYMBOL_GPL(osd_waitevent_create);
-
-
-/**
- * osd_waitevent_set() - Wake up the process
- * @wait_event: Structure to event to be woken up
- *
- * @wait_event is of type &struct osd_waitevent
- *
- * Wake up the sleeping process so it can do some work.
- * And set condition indicator in &struct osd_waitevent to indicate
- * the process is in a woken state.
- *
- * Only used by Network and...
2009 Jun 11
1
[PATCH 1/1] ocfs2/net: Use wait_event() in o2net_send_message_vec()
Replace wait_event_interruptible() with wait_event() in o2net_send_message_vec().
This is because this function is called by the dlm that expects signals to be
blocked.
Fixes oss bugzilla#1126
http://oss.oracle.com/bugzilla/show_bug.cgi?id=1126
Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>
---...
2023 Mar 28
1
[PATCH v6 04/11] vhost: take worker or vq instead of dev for flushing
...drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -247,6 +247,20 @@ static void vhost_work_queue_on(struct vhost_worker *worker,
}
}
+static void vhost_work_flush_on(struct vhost_worker *worker)
+{
+ struct vhost_flush_struct flush;
+
+ if (!worker)
+ return;
+
+ init_completion(&flush.wait_event);
+ vhost_work_init(&flush.work, vhost_flush_work);
+
+ vhost_work_queue_on(worker, &flush.work);
+ wait_for_completion(&flush.wait_event);
+}
+
void vhost_work_queue(struct vhost_dev *dev, struct vhost_work *work)
{
vhost_work_queue_on(dev->worker, work);
@@ -261,15 +275,7 @@...
2010 Nov 01
5
[PATCH 03/10] staging: hv: Convert camel cased struct fields in hv.h to lower cases
From: Haiyang Zhang <haiyangz at microsoft.com>
Convert camel cased struct fields in hv.h to lower cases
Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com>
Signed-off-by: Hank Janssen <hjanssen at microsoft.com>
---
drivers/staging/hv/hv.c | 95 +++++++++++++++++++++++---------------------
drivers/staging/hv/hv.h | 20 +++++-----
drivers/staging/hv/vmbus.c |
2010 Nov 01
5
[PATCH 03/10] staging: hv: Convert camel cased struct fields in hv.h to lower cases
From: Haiyang Zhang <haiyangz at microsoft.com>
Convert camel cased struct fields in hv.h to lower cases
Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com>
Signed-off-by: Hank Janssen <hjanssen at microsoft.com>
---
drivers/staging/hv/hv.c | 95 +++++++++++++++++++++++---------------------
drivers/staging/hv/hv.h | 20 +++++-----
drivers/staging/hv/vmbus.c |
2015 Nov 14
1
[PATCH v2] pmu: fix queued messages while getting no IRQ
I encountered while stresstesting the reclocking code, that rarely (1 out of
20.000+ requests) we don't get any IRQ in nvkm_pmu_intr.
This means we have a queued message on the pmu, but nouveau doesn't read it and
waits infinitely in nvkm_pmu_send:
if (reply) {
wait_event(pmu->recv.wait, (pmu->recv.process == 0));
therefore let us use wait_event_timeout with a 1s timeout frame and just check
whether there is a message queued and handle it if there is one.
Return -ETIMEDOUT whenever we timed out and there is no message queued or when
we hit another timeout...
2017 Jun 20
2
[PATCH v11 6/6] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
On Fri, Jun 09, 2017 at 06:41:41PM +0800, Wei Wang wrote:
> - if (!virtqueue_indirect_desc_table_add(vq, desc, num)) {
> + if (!virtqueue_indirect_desc_table_add(vq, desc, *num)) {
> virtqueue_kick(vq);
> - wait_event(vb->acked, virtqueue_get_buf(vq, &len));
> - vb->balloon_page_chunk.chunk_num = 0;
> + if (busy_wait)
> + while (!virtqueue_get_buf(vq, &len) &&
> + !virtqueue_is_broken(vq))
> + cpu_relax();
> + else
> + wait_event(vb->acked, virt...
2017 Jun 20
2
[PATCH v11 6/6] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
On Fri, Jun 09, 2017 at 06:41:41PM +0800, Wei Wang wrote:
> - if (!virtqueue_indirect_desc_table_add(vq, desc, num)) {
> + if (!virtqueue_indirect_desc_table_add(vq, desc, *num)) {
> virtqueue_kick(vq);
> - wait_event(vb->acked, virtqueue_get_buf(vq, &len));
> - vb->balloon_page_chunk.chunk_num = 0;
> + if (busy_wait)
> + while (!virtqueue_get_buf(vq, &len) &&
> + !virtqueue_is_broken(vq))
> + cpu_relax();
> + else
> + wait_event(vb->acked, virt...
2015 Feb 26
2
virtio balloon: do not call blocking ops when !TASK_RUNNING
...> You could either use pointers, or simply allocate vcdev with GDP_DMA.
>
> This would avoid the kmalloc inside these calls.
>
> Thanks,
> Rusty.
But it won't solve the problem of nested sleepers
with ccw: ATM is invokes ccw_io_helper to execute
commands, and that one calls wait_event
to wait for an interrupt.
Might be fixable but I think my patch looks like a safer
solution for 4.0/3.19, no?
--
MST
2015 Feb 26
2
virtio balloon: do not call blocking ops when !TASK_RUNNING
...> You could either use pointers, or simply allocate vcdev with GDP_DMA.
>
> This would avoid the kmalloc inside these calls.
>
> Thanks,
> Rusty.
But it won't solve the problem of nested sleepers
with ccw: ATM is invokes ccw_io_helper to execute
commands, and that one calls wait_event
to wait for an interrupt.
Might be fixable but I think my patch looks like a safer
solution for 4.0/3.19, no?
--
MST
2015 Feb 26
0
virtio balloon: do not call blocking ops when !TASK_RUNNING
...allocate vcdev with GDP_DMA.
> >
> > This would avoid the kmalloc inside these calls.
> >
> > Thanks,
> > Rusty.
>
> But it won't solve the problem of nested sleepers
> with ccw: ATM is invokes ccw_io_helper to execute
> commands, and that one calls wait_event
> to wait for an interrupt.
>
> Might be fixable but I think my patch looks like a safer
> solution for 4.0/3.19, no?
I've no idea what your patch was since I'm not subscribed to any of the
lists this discussion is had on.
But you can annotate the warning away; _however_ w...
2015 Feb 26
0
virtio balloon: do not call blocking ops when !TASK_RUNNING
...allocate vcdev with GDP_DMA.
> >
> > This would avoid the kmalloc inside these calls.
> >
> > Thanks,
> > Rusty.
>
> But it won't solve the problem of nested sleepers
> with ccw: ATM is invokes ccw_io_helper to execute
> commands, and that one calls wait_event
> to wait for an interrupt.
>
> Might be fixable but I think my patch looks like a safer
> solution for 4.0/3.19, no?
I've no idea what your patch was since I'm not subscribed to any of the
lists this discussion is had on.
But you can annotate the warning away; _however_ w...
2015 Nov 14
0
[PATCH] pmu: fix queued messages while getting no IRQ
I encountered while stresstesting the reclocking code, that rarely (1 out of
20.000+ requests) we don't get any IRQ in nvkm_pmu_intr.
This means we have a queued message on the pmu, but nouveau doesn't read it and
waits infinitely in nvkm_pmu_send:
if (reply) {
wait_event(pmu->recv.wait, (pmu->recv.process == 0));
therefore let us use wait_event_timeout with a 1s timeout frame and just check
whether there is a message queued and handle it if there is one.
Return -ETIMEDOUT whenever we timed out and there is no message queued or when
we hit another timeout...
2015 Feb 25
7
virtio balloon: do not call blocking ops when !TASK_RUNNING
Hi all,
with the recent kernel 3.19, I get a kernel warning when I start my
KVM guest on s390 with virtio balloon enabled:
[ 0.839687] do not call blocking ops when !TASK_RUNNING; state=1 set at
[<0000000000174a1e>] prepare_to_wait_event+0x7e/0x108
[ 0.839694] ------------[ cut here ]------------
[ 0.839697] WARNING: at kernel/sched/core.c:7326
[ 0.839698] Modules linked in:
[ 0.839702] CPU: 0 PID: 46 Comm: vballoon Not tainted 3.19.0 #233
[ 0.839705] task: 00000000021d0000 ti: 00000000021d8000 task.ti: 0000000002...