Displaying 20 results from an estimated 32 matches for "queue_seq".
Did you mean:
queue_sel
2010 Jul 29
1
[PATCH] vhost: locking/rcu cleanup
...wait_queue_t *wait, unsigned mode, int sync,
return 0;
}
+/* Must be called for each vq before vhost_dev_init. */
+void vhost_work_set_fn(struct vhost_work *work, vhost_work_fn_t fn)
+{
+ work->fn = fn;
+}
+
+static void vhost_work_init(struct vhost_work *work)
+{
+ atomic_set(&work->queue_seq, 0);
+ work->done_seq = 0;
+}
+
/* Init poll structure */
-void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn,
+void vhost_poll_init(struct vhost_poll *poll, struct vhost_work *work,
unsigned long mask, struct vhost_dev *dev)
{
- struct vhost_work *work = &poll->wo...
2010 Jul 29
1
[PATCH] vhost: locking/rcu cleanup
...wait_queue_t *wait, unsigned mode, int sync,
return 0;
}
+/* Must be called for each vq before vhost_dev_init. */
+void vhost_work_set_fn(struct vhost_work *work, vhost_work_fn_t fn)
+{
+ work->fn = fn;
+}
+
+static void vhost_work_init(struct vhost_work *work)
+{
+ atomic_set(&work->queue_seq, 0);
+ work->done_seq = 0;
+}
+
/* Init poll structure */
-void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn,
+void vhost_poll_init(struct vhost_poll *poll, struct vhost_work *work,
unsigned long mask, struct vhost_dev *dev)
{
- struct vhost_work *work = &poll->wo...
2016 Apr 26
2
[PATCH 1/2] vhost: simplify work flushing
...l_func(struct file *file, wait_queue_head_t *wqh,
poll_table *pt)
{
@@ -158,8 +171,6 @@ void vhost_work_init(struct vhost_work *work, vhost_work_fn_t fn)
INIT_LIST_HEAD(&work->node);
work->fn = fn;
init_waitqueue_head(&work->done);
- work->flushing = 0;
- work->queue_seq = work->done_seq = 0;
}
EXPORT_SYMBOL_GPL(vhost_work_init);
@@ -211,31 +222,17 @@ void vhost_poll_stop(struct vhost_poll *poll)
}
EXPORT_SYMBOL_GPL(vhost_poll_stop);
-static bool vhost_work_seq_done(struct vhost_dev *dev, struct vhost_work *work,
- unsigned seq)
-{
- int left;
-
- spi...
2016 Apr 26
2
[PATCH 1/2] vhost: simplify work flushing
...l_func(struct file *file, wait_queue_head_t *wqh,
poll_table *pt)
{
@@ -158,8 +171,6 @@ void vhost_work_init(struct vhost_work *work, vhost_work_fn_t fn)
INIT_LIST_HEAD(&work->node);
work->fn = fn;
init_waitqueue_head(&work->done);
- work->flushing = 0;
- work->queue_seq = work->done_seq = 0;
}
EXPORT_SYMBOL_GPL(vhost_work_init);
@@ -211,31 +222,17 @@ void vhost_poll_stop(struct vhost_poll *poll)
}
EXPORT_SYMBOL_GPL(vhost_poll_stop);
-static bool vhost_work_seq_done(struct vhost_dev *dev, struct vhost_work *work,
- unsigned seq)
-{
- int left;
-
- spi...
2010 Sep 05
0
[PATCH] vhost: fix attach to cgroups regression
...c int vhost_poll_wakeup(wait_queue_t *wait, unsigned mode, int sync,
return 0;
}
+static void vhost_work_init(struct vhost_work *work, vhost_work_fn_t fn)
+{
+ INIT_LIST_HEAD(&work->node);
+ work->fn = fn;
+ init_waitqueue_head(&work->done);
+ work->flushing = 0;
+ work->queue_seq = work->done_seq = 0;
+}
+
/* Init poll structure */
void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn,
unsigned long mask, struct vhost_dev *dev)
{
- struct vhost_work *work = &poll->work;
-
init_waitqueue_func_entry(&poll->wait, vhost_poll_wakeup);
i...
2010 Sep 05
0
[PATCH] vhost: fix attach to cgroups regression
...c int vhost_poll_wakeup(wait_queue_t *wait, unsigned mode, int sync,
return 0;
}
+static void vhost_work_init(struct vhost_work *work, vhost_work_fn_t fn)
+{
+ INIT_LIST_HEAD(&work->node);
+ work->fn = fn;
+ init_waitqueue_head(&work->done);
+ work->flushing = 0;
+ work->queue_seq = work->done_seq = 0;
+}
+
/* Init poll structure */
void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn,
unsigned long mask, struct vhost_dev *dev)
{
- struct vhost_work *work = &poll->work;
-
init_waitqueue_func_entry(&poll->wait, vhost_poll_wakeup);
i...
2018 Jan 09
1
[PATCH] vhost: Remove the unused variable.
...6e7a60a5e..749fe13e061c 100644
--- a/drivers/vhost/vhost.h
+++ b/drivers/vhost/vhost.h
@@ -20,10 +20,6 @@ typedef void (*vhost_work_fn_t)(struct vhost_work *work);
struct vhost_work {
struct llist_node node;
vhost_work_fn_t fn;
- wait_queue_head_t done;
- int flushing;
- unsigned queue_seq;
- unsigned done_seq;
unsigned long flags;
};
--
2.13.6
2018 Jan 09
0
[PATCH v2] vhost: Remove the unused variable.
...6e7a60a5e..749fe13e061c 100644
--- a/drivers/vhost/vhost.h
+++ b/drivers/vhost/vhost.h
@@ -20,10 +20,6 @@ typedef void (*vhost_work_fn_t)(struct vhost_work *work);
struct vhost_work {
struct llist_node node;
vhost_work_fn_t fn;
- wait_queue_head_t done;
- int flushing;
- unsigned queue_seq;
- unsigned done_seq;
unsigned long flags;
};
--
2.13.6
2011 Jan 10
0
[PATCH] vhost: fix signed/unsigned comparison
...rk_lock);
+ left = seq - work->done_seq;
+ spin_unlock_irq(&dev->work_lock);
+ return left <= 0;
+}
+
static void vhost_work_flush(struct vhost_dev *dev, struct vhost_work *work)
{
unsigned seq;
- int left;
int flushing;
spin_lock_irq(&dev->work_lock);
seq = work->queue_seq;
work->flushing++;
spin_unlock_irq(&dev->work_lock);
- wait_event(work->done, ({
- spin_lock_irq(&dev->work_lock);
- left = seq - work->done_seq <= 0;
- spin_unlock_irq(&dev->work_lock);
- left;
- }));
+ wait_event(work->done, vhost_work_seq_d...
2011 Jan 10
0
[PATCH] vhost: fix signed/unsigned comparison
...rk_lock);
+ left = seq - work->done_seq;
+ spin_unlock_irq(&dev->work_lock);
+ return left <= 0;
+}
+
static void vhost_work_flush(struct vhost_dev *dev, struct vhost_work *work)
{
unsigned seq;
- int left;
int flushing;
spin_lock_irq(&dev->work_lock);
seq = work->queue_seq;
work->flushing++;
spin_unlock_irq(&dev->work_lock);
- wait_event(work->done, ({
- spin_lock_irq(&dev->work_lock);
- left = seq - work->done_seq <= 0;
- spin_unlock_irq(&dev->work_lock);
- left;
- }));
+ wait_event(work->done, vhost_work_seq_d...
2016 Apr 26
0
[PATCH 2/2] vhost: lockless enqueuing
...host.h
@@ -15,13 +15,15 @@
struct vhost_work;
typedef void (*vhost_work_fn_t)(struct vhost_work *work);
+#define VHOST_WORK_QUEUED 1
struct vhost_work {
- struct list_head node;
+ struct llist_node node;
vhost_work_fn_t fn;
wait_queue_head_t done;
int flushing;
unsigned queue_seq;
unsigned done_seq;
+ unsigned long flags;
};
/* Poll a file (eventfd or socket) */
@@ -126,8 +128,7 @@ struct vhost_dev {
int nvqs;
struct file *log_file;
struct eventfd_ctx *log_ctx;
- spinlock_t work_lock;
- struct list_head work_list;
+ struct llist_head work_list;
struct ta...
2017 Mar 07
2
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
.../virtio_ring.h>
-#include <linux/atomic.h>
-
-struct vhost_work;
-typedef void (*vhost_work_fn_t)(struct vhost_work *work);
-
-#define VHOST_WORK_QUEUED 1
-struct vhost_work {
- struct llist_node node;
- vhost_work_fn_t fn;
- wait_queue_head_t done;
- int flushing;
- unsigned queue_seq;
- unsigned done_seq;
- unsigned long flags;
-};
-
-/* Poll a file (eventfd or socket) */
-/* Note: there's nothing vhost specific about this structure. */
-struct vhost_poll {
- poll_table table;
- wait_queue_head_t *wqh;
- wait_queue_t wait;
- struct v...
2017 Mar 07
2
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
.../virtio_ring.h>
-#include <linux/atomic.h>
-
-struct vhost_work;
-typedef void (*vhost_work_fn_t)(struct vhost_work *work);
-
-#define VHOST_WORK_QUEUED 1
-struct vhost_work {
- struct llist_node node;
- vhost_work_fn_t fn;
- wait_queue_head_t done;
- int flushing;
- unsigned queue_seq;
- unsigned done_seq;
- unsigned long flags;
-};
-
-/* Poll a file (eventfd or socket) */
-/* Note: there's nothing vhost specific about this structure. */
-struct vhost_poll {
- poll_table table;
- wait_queue_head_t *wqh;
- wait_queue_t wait;
- struct v...
2016 Apr 26
2
[PATCH 2/2] vhost: lockless enqueuing
...; typedef void (*vhost_work_fn_t)(struct vhost_work *work);
>
> +#define VHOST_WORK_QUEUED 1
> struct vhost_work {
> - struct list_head node;
> + struct llist_node node;
> vhost_work_fn_t fn;
> wait_queue_head_t done;
> int flushing;
> unsigned queue_seq;
> unsigned done_seq;
> + unsigned long flags;
> };
>
> /* Poll a file (eventfd or socket) */
> @@ -126,8 +128,7 @@ struct vhost_dev {
> int nvqs;
> struct file *log_file;
> struct eventfd_ctx *log_ctx;
> - spinlock_t work_lock;
> - struct list_hea...
2016 Apr 26
2
[PATCH 2/2] vhost: lockless enqueuing
...; typedef void (*vhost_work_fn_t)(struct vhost_work *work);
>
> +#define VHOST_WORK_QUEUED 1
> struct vhost_work {
> - struct list_head node;
> + struct llist_node node;
> vhost_work_fn_t fn;
> wait_queue_head_t done;
> int flushing;
> unsigned queue_seq;
> unsigned done_seq;
> + unsigned long flags;
> };
>
> /* Poll a file (eventfd or socket) */
> @@ -126,8 +128,7 @@ struct vhost_dev {
> int nvqs;
> struct file *log_file;
> struct eventfd_ctx *log_ctx;
> - spinlock_t work_lock;
> - struct list_hea...
2014 Aug 10
0
[PATCH] vhost: Add polling mode
...st_work_fn_t fn)
> +void vhost_work_init(struct vhost_work *work, struct vhost_virtqueue *vq,
> + vhost_work_fn_t fn)
> {
> INIT_LIST_HEAD(&work->node);
> work->fn = fn;
> init_waitqueue_head(&work->done);
> work->flushing = 0;
> work->queue_seq = work->done_seq = 0;
> + work->vq = vq;
> }
> EXPORT_SYMBOL_GPL(vhost_work_init);
>
> /* Init poll structure */
> void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn,
> - unsigned long mask, struct vhost_dev *dev)
> + unsigned long mask,...
2017 Mar 10
0
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
...; -
> -struct vhost_work;
> -typedef void (*vhost_work_fn_t)(struct vhost_work *work);
> -
> -#define VHOST_WORK_QUEUED 1
> -struct vhost_work {
> - struct llist_node node;
> - vhost_work_fn_t fn;
> - wait_queue_head_t done;
> - int flushing;
> - unsigned queue_seq;
> - unsigned done_seq;
> - unsigned long flags;
> -};
> -
> -/* Poll a file (eventfd or socket) */
> -/* Note: there's nothing vhost specific about this structure. */
> -struct vhost_poll {
> - poll_table table;
> - wait_queue_head_t *wqh;...
2013 Jul 07
2
[PATCH v2 03/11] vhost: Make vhost a separate module
...p.h>
> > > +#include <linux/module.h>
> > >
> > > #include "vhost.h"
> > >
> > > @@ -66,6 +67,7 @@ void vhost_work_init(struct vhost_work *work, vhost_work_fn_t fn)
> > > work->flushing = 0;
> > > work->queue_seq = work->done_seq = 0;
> > > }
> > > +EXPORT_SYMBOL_GPL(vhost_work_init);
> > >
> > > /* Init poll structure */
> > > void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn,
> > > @@ -79,6 +81,7 @@ void vhost_poll_init(struct vh...
2013 Jul 07
2
[PATCH v2 03/11] vhost: Make vhost a separate module
...p.h>
> > > +#include <linux/module.h>
> > >
> > > #include "vhost.h"
> > >
> > > @@ -66,6 +67,7 @@ void vhost_work_init(struct vhost_work *work, vhost_work_fn_t fn)
> > > work->flushing = 0;
> > > work->queue_seq = work->done_seq = 0;
> > > }
> > > +EXPORT_SYMBOL_GPL(vhost_work_init);
> > >
> > > /* Init poll structure */
> > > void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn,
> > > @@ -79,6 +81,7 @@ void vhost_poll_init(struct vh...
2014 Aug 20
0
[PATCH] vhost: Add polling mode
...st_work_fn_t fn)
> +void vhost_work_init(struct vhost_work *work, struct vhost_virtqueue *vq,
> + vhost_work_fn_t fn)
> {
> INIT_LIST_HEAD(&work->node);
> work->fn = fn;
> init_waitqueue_head(&work->done);
> work->flushing = 0;
> work->queue_seq = work->done_seq = 0;
> + work->vq = vq;
> }
> EXPORT_SYMBOL_GPL(vhost_work_init);
>
> /* Init poll structure */
> void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn,
> - unsigned long mask, struct vhost_dev *dev)
> + unsigned long mask,...