search for: vhost_blk_flush

Displaying 19 results from an estimated 19 matches for "vhost_blk_flush".

2018 Nov 02
0
[PATCH 1/1] Add vhost_blk driver
...lk_req req[VHOST_BLK_VQ_MAX_REQS]; > +}; > + > +struct vhost_blk { > + struct vhost_dev dev; > + struct file *backend; > + int num_queues; > + struct vhost_virtqueue *vqs[VHOST_BLK_VQ_MAX]; > + struct vhost_blk_queue queue[VHOST_BLK_VQ_MAX]; > +}; > + > +static void vhost_blk_flush(struct vhost_blk *blk) > +{ > + int i; > + > + for (i = 0; i < blk->num_queues; i++) > + vhost_poll_flush(&blk->queue[i].vq.poll); > +} > + > + > +static void vhost_blk_stop(struct vhost_blk *blk) > +{ > + struct vhost_virtqueue *vq; > + int i; >...
2012 Nov 19
1
[PATCH] vhost-blk: Add vhost-blk support v5
...status(req, status); + if (unlikely(ret)) + continue; + vhost_add_used(&blk->vq, req->head, req->len); + added = true; + } + if (likely(added)) + vhost_signal(&blk->dev, &blk->vq); + } + unuse_mm(blk->dev.mm); + set_fs(oldfs); + return 0; +} + +static void vhost_blk_flush(struct vhost_blk *blk) +{ + vhost_poll_flush(&blk->vq.poll); +} + +static inline void vhost_blk_stop(struct vhost_blk *blk, struct file **file) +{ + struct vhost_virtqueue *vq = &blk->vq; + struct file *f; + + mutex_lock(&vq->mutex); + f = rcu_dereference_protected(vq->priva...
2012 Nov 19
1
[PATCH] vhost-blk: Add vhost-blk support v5
...status(req, status); + if (unlikely(ret)) + continue; + vhost_add_used(&blk->vq, req->head, req->len); + added = true; + } + if (likely(added)) + vhost_signal(&blk->dev, &blk->vq); + } + unuse_mm(blk->dev.mm); + set_fs(oldfs); + return 0; +} + +static void vhost_blk_flush(struct vhost_blk *blk) +{ + vhost_poll_flush(&blk->vq.poll); +} + +static inline void vhost_blk_stop(struct vhost_blk *blk, struct file **file) +{ + struct vhost_virtqueue *vq = &blk->vq; + struct file *f; + + mutex_lock(&vq->mutex); + f = rcu_dereference_protected(vq->priva...
2012 Oct 15
2
[PATCH 1/1] vhost-blk: Add vhost-blk support v4
...status(req, status); + if (unlikely(ret)) + continue; + vhost_add_used(&blk->vq, req->head, req->len); + added = true; + } + if (likely(added)) + vhost_signal(&blk->dev, &blk->vq); + } + unuse_mm(blk->dev.mm); + set_fs(oldfs); + return 0; +} + +static void vhost_blk_flush(struct vhost_blk *blk) +{ + vhost_poll_flush(&blk->vq.poll); +} + +static inline void vhost_blk_stop(struct vhost_blk *blk, struct file **file) +{ + struct vhost_virtqueue *vq = &blk->vq; + struct file *f; + + mutex_lock(&vq->mutex); + f = rcu_dereference_protected(vq->priva...
2012 Oct 15
2
[PATCH 1/1] vhost-blk: Add vhost-blk support v4
...status(req, status); + if (unlikely(ret)) + continue; + vhost_add_used(&blk->vq, req->head, req->len); + added = true; + } + if (likely(added)) + vhost_signal(&blk->dev, &blk->vq); + } + unuse_mm(blk->dev.mm); + set_fs(oldfs); + return 0; +} + +static void vhost_blk_flush(struct vhost_blk *blk) +{ + vhost_poll_flush(&blk->vq.poll); +} + +static inline void vhost_blk_stop(struct vhost_blk *blk, struct file **file) +{ + struct vhost_virtqueue *vq = &blk->vq; + struct file *f; + + mutex_lock(&vq->mutex); + f = rcu_dereference_protected(vq->priva...
2012 Dec 02
3
[PATCH] vhost-blk: Add vhost-blk support v6
...asias/linux-kvm.git blk.vhost-blk 2) QEMU The latest vhost-blk userspace prototype for QEMU can be found here: git at github.com:asias/qemu.git blk.vhost-blk Changes in v6: - Use inline req_page_list to reduce kmalloc - Switch to single thread model, thanks mst! - Wait until requests fired before vhost_blk_flush to be finished Changes in v5: - Do not assume the buffer layout - Fix wakeup race Changes in v4: - Mark req->status as userspace pointer - Use __copy_to_user() instead of copy_to_user() in vhost_blk_set_status() - Add if (need_resched()) schedule() in blk thread - Kill vhost_blk_stop_vq() and...
2012 Dec 02
3
[PATCH] vhost-blk: Add vhost-blk support v6
...asias/linux-kvm.git blk.vhost-blk 2) QEMU The latest vhost-blk userspace prototype for QEMU can be found here: git at github.com:asias/qemu.git blk.vhost-blk Changes in v6: - Use inline req_page_list to reduce kmalloc - Switch to single thread model, thanks mst! - Wait until requests fired before vhost_blk_flush to be finished Changes in v5: - Do not assume the buffer layout - Fix wakeup race Changes in v4: - Mark req->status as userspace pointer - Use __copy_to_user() instead of copy_to_user() in vhost_blk_set_status() - Add if (need_resched()) schedule() in blk thread - Kill vhost_blk_stop_vq() and...
2012 Oct 09
2
[PATCH] vhost-blk: Add vhost-blk support v2
...t;Failed to write status\n"); + return -1; + } + vhost_add_used(&blk->vq, req->head, req->len); + added = true; + } + if (likely(added)) + vhost_signal(&blk->dev, &blk->vq); + + } + unuse_mm(blk->dev.mm); + set_fs(oldfs); + return 0; +} + +static void vhost_blk_flush(struct vhost_blk *blk) +{ + vhost_poll_flush(&blk->vq.poll); +} + +static struct file *vhost_blk_stop_vq(struct vhost_blk *blk, + struct vhost_virtqueue *vq) +{ + struct file *file; + + mutex_lock(&vq->mutex); + file = rcu_dereference_protected(vq->private_data, + lockde...
2012 Oct 09
2
[PATCH] vhost-blk: Add vhost-blk support v2
...t;Failed to write status\n"); + return -1; + } + vhost_add_used(&blk->vq, req->head, req->len); + added = true; + } + if (likely(added)) + vhost_signal(&blk->dev, &blk->vq); + + } + unuse_mm(blk->dev.mm); + set_fs(oldfs); + return 0; +} + +static void vhost_blk_flush(struct vhost_blk *blk) +{ + vhost_poll_flush(&blk->vq.poll); +} + +static struct file *vhost_blk_stop_vq(struct vhost_blk *blk, + struct vhost_virtqueue *vq) +{ + struct file *file; + + mutex_lock(&vq->mutex); + file = rcu_dereference_protected(vq->private_data, + lockde...
2012 Oct 10
0
[PATCH] vhost-blk: Add vhost-blk support v3
...t;Failed to write status\n"); + return -1; + } + vhost_add_used(&blk->vq, req->head, req->len); + added = true; + } + if (likely(added)) + vhost_signal(&blk->dev, &blk->vq); + + } + unuse_mm(blk->dev.mm); + set_fs(oldfs); + return 0; +} + +static void vhost_blk_flush(struct vhost_blk *blk) +{ + vhost_poll_flush(&blk->vq.poll); +} + +static struct file *vhost_blk_stop_vq(struct vhost_blk *blk, + struct vhost_virtqueue *vq) +{ + struct file *file; + + mutex_lock(&vq->mutex); + file = rcu_dereference_protected(vq->private_data, + lockde...
2012 Oct 10
0
[PATCH] vhost-blk: Add vhost-blk support v3
...t;Failed to write status\n"); + return -1; + } + vhost_add_used(&blk->vq, req->head, req->len); + added = true; + } + if (likely(added)) + vhost_signal(&blk->dev, &blk->vq); + + } + unuse_mm(blk->dev.mm); + set_fs(oldfs); + return 0; +} + +static void vhost_blk_flush(struct vhost_blk *blk) +{ + vhost_poll_flush(&blk->vq.poll); +} + +static struct file *vhost_blk_stop_vq(struct vhost_blk *blk, + struct vhost_virtqueue *vq) +{ + struct file *file; + + mutex_lock(&vq->mutex); + file = rcu_dereference_protected(vq->private_data, + lockde...
2012 Jul 12
2
[PATCH 3/5] vhost: Make vhost a separate module
Currently, vhost-net is the only consumer of vhost infrastructure. So vhost infrastructure and vhost-net driver are in a single module. Separating this as a vhost.ko module and a vhost-net.ko module makes it is easier to share code with other vhost drivers, e.g. vhost-blk.ko, tcm-vhost.ko. Signed-off-by: Asias He <asias at redhat.com> --- drivers/vhost/Kconfig | 10 +++++++++-
2012 Jul 12
2
[PATCH 3/5] vhost: Make vhost a separate module
Currently, vhost-net is the only consumer of vhost infrastructure. So vhost infrastructure and vhost-net driver are in a single module. Separating this as a vhost.ko module and a vhost-net.ko module makes it is easier to share code with other vhost drivers, e.g. vhost-blk.ko, tcm-vhost.ko. Signed-off-by: Asias He <asias at redhat.com> --- drivers/vhost/Kconfig | 10 +++++++++-
2010 Mar 23
1
[RFC] vhost-blk implementation
...v_base, &status, sizeof status) < 0) { + printk("copy to user failed\n"); + vhost_discard_vq_desc(vq); + break; + } + vhost_add_used_and_signal(&blk->dev, vq, head, r); + } + mutex_unlock(&vq->mutex); + unuse_mm(blk->dev.mm); +} + +static void vhost_blk_flush(struct vhost_blk *n) +{ + vhost_poll_flush(n->poll); + vhost_poll_flush(&n->dev.vqs[0].poll); +} + +static void handle_blk_kick(struct work_struct *work) +{ + struct vhost_virtqueue *vq; + struct vhost_blk *blk; + vq = container_of(work, struct vhost_virtqueue, poll.work); + blk = contain...
2010 Mar 23
1
[RFC] vhost-blk implementation
...v_base, &status, sizeof status) < 0) { + printk("copy to user failed\n"); + vhost_discard_vq_desc(vq); + break; + } + vhost_add_used_and_signal(&blk->dev, vq, head, r); + } + mutex_unlock(&vq->mutex); + unuse_mm(blk->dev.mm); +} + +static void vhost_blk_flush(struct vhost_blk *n) +{ + vhost_poll_flush(n->poll); + vhost_poll_flush(&n->dev.vqs[0].poll); +} + +static void handle_blk_kick(struct work_struct *work) +{ + struct vhost_virtqueue *vq; + struct vhost_blk *blk; + vq = container_of(work, struct vhost_virtqueue, poll.work); + blk = contain...
2010 Apr 07
0
[RFC] vhost-blk implementation (v2)
...BLK_T_IN) + nvecs = in - 1; + + BUG_ON(vq->iov[nvecs+1].iov_len != 1); + if (handoff_io(blk, head, hdr.type, hdr.sector, &vq->iov[1], nvecs) < 0) { + vhost_discard_vq_desc(vq); + continue; + } + } + mutex_unlock(&vq->mutex); + unuse_mm(blk->dev.mm); +} + +static void vhost_blk_flush(struct vhost_blk *n) +{ + vhost_poll_flush(n->poll); + vhost_poll_flush(&n->dev.vqs[0].poll); +} + +static void handle_blk_kick(struct work_struct *work) +{ + struct vhost_virtqueue *vq; + struct vhost_blk *blk; + vq = container_of(work, struct vhost_virtqueue, poll.work); + blk = contain...
2010 Apr 07
0
[RFC] vhost-blk implementation (v2)
...BLK_T_IN) + nvecs = in - 1; + + BUG_ON(vq->iov[nvecs+1].iov_len != 1); + if (handoff_io(blk, head, hdr.type, hdr.sector, &vq->iov[1], nvecs) < 0) { + vhost_discard_vq_desc(vq); + continue; + } + } + mutex_unlock(&vq->mutex); + unuse_mm(blk->dev.mm); +} + +static void vhost_blk_flush(struct vhost_blk *n) +{ + vhost_poll_flush(n->poll); + vhost_poll_flush(&n->dev.vqs[0].poll); +} + +static void handle_blk_kick(struct work_struct *work) +{ + struct vhost_virtqueue *vq; + struct vhost_blk *blk; + vq = container_of(work, struct vhost_virtqueue, poll.work); + blk = contain...
2012 Jul 13
9
[PATCH RESEND 0/5] Add vhost-blk support
Hi folks, [I am resending to fix the broken thread in the previous one.] This patchset adds vhost-blk support. vhost-blk is a in kernel virito-blk device accelerator. Compared to userspace virtio-blk implementation, vhost-blk gives about 5% to 15% performance improvement. Asias He (5): aio: Export symbols and struct kiocb_batch for in kernel aio usage eventfd: Export symbol
2012 Jul 13
9
[PATCH RESEND 0/5] Add vhost-blk support
Hi folks, [I am resending to fix the broken thread in the previous one.] This patchset adds vhost-blk support. vhost-blk is a in kernel virito-blk device accelerator. Compared to userspace virtio-blk implementation, vhost-blk gives about 5% to 15% performance improvement. Asias He (5): aio: Export symbols and struct kiocb_batch for in kernel aio usage eventfd: Export symbol