search for: virtblk_add_req

Displaying 20 results from an estimated 40 matches for "virtblk_add_req".

2013 Feb 12
12
[PATCH 0/9] virtio: new API for addition of buffers, scatterlist changes
...ested (including virtio-serial, all three virtio-net receive paths, and virtio-blk SG_IO which I hadn't checked for the RFC); anyway this did not bring in new code changes. Ok for 3.9? Paolo Paolo Bonzini (9): virtio: add functions for piecewise addition of buffers virtio-blk: reorganize virtblk_add_req virtio-blk: use virtqueue_start_buf on bio path virtio-blk: use virtqueue_start_buf on req path scatterlist: introduce sg_unmark_end virtio-net: unmark scatterlist ending after virtqueue_add_buf virtio-scsi: use virtqueue_start_buf virtio: introduce and use virtqueue_add_buf_single vi...
2013 Feb 12
12
[PATCH 0/9] virtio: new API for addition of buffers, scatterlist changes
...ested (including virtio-serial, all three virtio-net receive paths, and virtio-blk SG_IO which I hadn't checked for the RFC); anyway this did not bring in new code changes. Ok for 3.9? Paolo Paolo Bonzini (9): virtio: add functions for piecewise addition of buffers virtio-blk: reorganize virtblk_add_req virtio-blk: use virtqueue_start_buf on bio path virtio-blk: use virtqueue_start_buf on req path scatterlist: introduce sg_unmark_end virtio-net: unmark scatterlist ending after virtqueue_add_buf virtio-scsi: use virtqueue_start_buf virtio: introduce and use virtqueue_add_buf_single vi...
2013 Feb 07
11
[RFC PATCH 0/8] virtio: new API for addition of buffers, scatterlist changes
...have two struct vring_desc * fields in virtqueue API, which is a layering violation. I'm not really sure how important that is and how to fix that---except by making the fields void*. Paolo Paolo Bonzini (8): virtio: add functions for piecewise addition of buffers virtio-blk: reorganize virtblk_add_req virtio-blk: use virtqueue_start_buf on bio path virtio-blk: use virtqueue_start_buf on req path scatterlist: introduce sg_unmark_end virtio-net: unmark scatterlist ending after virtqueue_add_buf virtio-scsi: use virtqueue_start_buf virtio: reimplement virtqueue_add_buf using new functio...
2013 Feb 07
11
[RFC PATCH 0/8] virtio: new API for addition of buffers, scatterlist changes
...have two struct vring_desc * fields in virtqueue API, which is a layering violation. I'm not really sure how important that is and how to fix that---except by making the fields void*. Paolo Paolo Bonzini (8): virtio: add functions for piecewise addition of buffers virtio-blk: reorganize virtblk_add_req virtio-blk: use virtqueue_start_buf on bio path virtio-blk: use virtqueue_start_buf on req path scatterlist: introduce sg_unmark_end virtio-net: unmark scatterlist ending after virtqueue_add_buf virtio-scsi: use virtqueue_start_buf virtio: reimplement virtqueue_add_buf using new functio...
2013 Feb 19
24
[PATCH 00/16] virtio ring rework.
OK, this is (ab)uses some of Paolo's patches. The first 7 are candidates for this merge window (maybe), the rest I'm not so sure about. Thanks, Rusty. Paolo Bonzini (3): scatterlist: introduce sg_unmark_end virtio-blk: reorganize virtblk_add_req virtio-blk: use virtqueue_add_sgs on req path Rusty Russell (13): virtio_ring: virtqueue_add_sgs, to add multiple sgs. virtio-blk: use virtqueue_start_buf on bio path virtio_blk: remove nents member. virtio_ring: don't count elements twice for add_buf path. virtio_ring: virtqueue_a...
2013 Feb 19
24
[PATCH 00/16] virtio ring rework.
OK, this is (ab)uses some of Paolo's patches. The first 7 are candidates for this merge window (maybe), the rest I'm not so sure about. Thanks, Rusty. Paolo Bonzini (3): scatterlist: introduce sg_unmark_end virtio-blk: reorganize virtblk_add_req virtio-blk: use virtqueue_add_sgs on req path Rusty Russell (13): virtio_ring: virtqueue_add_sgs, to add multiple sgs. virtio-blk: use virtqueue_start_buf on bio path virtio_blk: remove nents member. virtio_ring: don't count elements twice for add_buf path. virtio_ring: virtqueue_a...
2019 Dec 12
4
[PATCH] virtio-blk: remove VIRTIO_BLK_F_SCSI support
...If this is a packet command we need a couple of additional headers. Behind - * the normal outhdr we put a segment with the scsi command block, and before - * the normal inhdr we put the sense data and the inhdr with additional status - * information. - */ -#ifdef CONFIG_VIRTIO_BLK_SCSI -static int virtblk_add_req_scsi(struct virtqueue *vq, struct virtblk_req *vbr, - struct scatterlist *data_sg, bool have_data) -{ - struct scatterlist hdr, status, cmd, sense, inhdr, *sgs[6]; - unsigned int num_out = 0, num_in = 0; - - sg_init_one(&hdr, &vbr->out_hdr, sizeof(vbr->out_hdr)); - sgs[num_out++] = &...
2013 Mar 18
28
[PATCH 00/22] virtqueue_add_sgs, virtqueue_add_outbuf, virtqueue_add_inbuf
...h handle the more general case, and finally delete virtqueue_add_buf(). I'm hoping this will be the final post of the whole series, and it can move from my pending-rebases tree into virtio-next. Thanks! Rusty. Paolo Bonzini (4): scatterlist: introduce sg_unmark_end virtio-blk: reorganize virtblk_add_req virtio-blk: use virtqueue_add_sgs on bio path virtio-blk: use virtqueue_add_sgs on req path Rusty Russell (17): virtio_ring: virtqueue_add_sgs, to add multiple sgs. virtio_ring: don't count elements twice for add_buf path. virtio_ring: inline internal vring functions more aggressivel...
2013 Mar 18
28
[PATCH 00/22] virtqueue_add_sgs, virtqueue_add_outbuf, virtqueue_add_inbuf
...h handle the more general case, and finally delete virtqueue_add_buf(). I'm hoping this will be the final post of the whole series, and it can move from my pending-rebases tree into virtio-next. Thanks! Rusty. Paolo Bonzini (4): scatterlist: introduce sg_unmark_end virtio-blk: reorganize virtblk_add_req virtio-blk: use virtqueue_add_sgs on bio path virtio-blk: use virtqueue_add_sgs on req path Rusty Russell (17): virtio_ring: virtqueue_add_sgs, to add multiple sgs. virtio_ring: don't count elements twice for add_buf path. virtio_ring: inline internal vring functions more aggressivel...
2013 Jan 02
0
[PATCH] virtio: use chained scatterlists
...vq, vbr->sg, out, in, vbr, + if (virtqueue_add_buf(vblk->vq, out, in, vbr, GFP_ATOMIC) < 0) { spin_unlock_irq(vblk->disk->queue->queue_lock); io_schedule(); @@ -128,12 +128,13 @@ static void virtblk_add_buf_wait(struct virtio_blk *vblk, } static inline void virtblk_add_req(struct virtblk_req *vbr, - unsigned int out, unsigned int in) + struct scatterlist *out, + struct scatterlist *in) { struct virtio_blk *vblk = vbr->vblk; spin_lock_irq(vblk->disk->queue->queue_lock); - if (unlikely(virtqueue_add_buf(vblk->vq, vbr->sg, out,...
2013 Jan 02
0
[PATCH] virtio: use chained scatterlists
...vq, vbr->sg, out, in, vbr, + if (virtqueue_add_buf(vblk->vq, out, in, vbr, GFP_ATOMIC) < 0) { spin_unlock_irq(vblk->disk->queue->queue_lock); io_schedule(); @@ -128,12 +128,13 @@ static void virtblk_add_buf_wait(struct virtio_blk *vblk, } static inline void virtblk_add_req(struct virtblk_req *vbr, - unsigned int out, unsigned int in) + struct scatterlist *out, + struct scatterlist *in) { struct virtio_blk *vblk = vbr->vblk; spin_lock_irq(vblk->disk->queue->queue_lock); - if (unlikely(virtqueue_add_buf(vblk->vq, vbr->sg, out,...
2020 Feb 14
1
[PATCH 1/2] virtio-blk: fix hw_queue stopped on arbitrary error
...> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > index 54158766334b..adfe43f5ffe4 100644 > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -245,10 +245,12 @@ static blk_status_t virtio_queue_rq(struct blk_mq_hw_ctx *hctx, > err = virtblk_add_req(vblk->vqs[qid].vq, vbr, vbr->sg, num); > if (err) { > virtqueue_kick(vblk->vqs[qid].vq); > - blk_mq_stop_hw_queue(hctx); > + /* Don't stop the queue if -ENOMEM: we may have failed to > + * bounce the buffer due to global resource outage. > + */ > + if (...
2017 Jul 05
3
[PATCH v2] virtio-blk: add DISCARD support to virtio-blk driver
...include/uapi/linux/virtio_blk.h | 19 +++++++++++ 2 files changed, 92 insertions(+), 3 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 0297ad7..8f0c614 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -172,10 +172,52 @@ static int virtblk_add_req(struct virtqueue *vq, struct virtblk_req *vbr, return virtqueue_add_sgs(vq, sgs, num_out, num_in, vbr, GFP_ATOMIC); } +static inline int virtblk_setup_discard(struct request *req) +{ + unsigned short segments = blk_rq_nr_discard_segments(req), n = 0; + u32 block_size = queue_logical_block_size...
2017 Jul 05
3
[PATCH v2] virtio-blk: add DISCARD support to virtio-blk driver
...include/uapi/linux/virtio_blk.h | 19 +++++++++++ 2 files changed, 92 insertions(+), 3 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 0297ad7..8f0c614 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -172,10 +172,52 @@ static int virtblk_add_req(struct virtqueue *vq, struct virtblk_req *vbr, return virtqueue_add_sgs(vq, sgs, num_out, num_in, vbr, GFP_ATOMIC); } +static inline int virtblk_setup_discard(struct request *req) +{ + unsigned short segments = blk_rq_nr_discard_segments(req), n = 0; + u32 block_size = queue_logical_block_size...
2020 Feb 13
0
[PATCH 1/2] virtio-blk: fix hw_queue stopped on arbitrary error
...insertions(+), 3 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 54158766334b..adfe43f5ffe4 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -245,10 +245,12 @@ static blk_status_t virtio_queue_rq(struct blk_mq_hw_ctx *hctx, err = virtblk_add_req(vblk->vqs[qid].vq, vbr, vbr->sg, num); if (err) { virtqueue_kick(vblk->vqs[qid].vq); - blk_mq_stop_hw_queue(hctx); + /* Don't stop the queue if -ENOMEM: we may have failed to + * bounce the buffer due to global resource outage. + */ + if (err == -ENOSPC) + blk_mq_stop_hw_...
2018 Mar 30
2
[PATCH v3] virtio_blk: add DISCARD and WRIET ZEROES command support
.../uapi/linux/virtio_blk.h | 39 +++++++++++++++++ 2 files changed, 132 insertions(+), 3 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 4a07593c..1943adb 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -172,10 +172,53 @@ static int virtblk_add_req(struct virtqueue *vq, struct virtblk_req *vbr, return virtqueue_add_sgs(vq, sgs, num_out, num_in, vbr, GFP_ATOMIC); } +static inline int virtblk_setup_discard_write_zeroes(struct request *req, bool unmap) +{ + unsigned short segments = blk_rq_nr_discard_segments(req), n = 0; + u32 block_size =...
2018 Mar 30
2
[PATCH v3] virtio_blk: add DISCARD and WRIET ZEROES command support
.../uapi/linux/virtio_blk.h | 39 +++++++++++++++++ 2 files changed, 132 insertions(+), 3 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 4a07593c..1943adb 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -172,10 +172,53 @@ static int virtblk_add_req(struct virtqueue *vq, struct virtblk_req *vbr, return virtqueue_add_sgs(vq, sgs, num_out, num_in, vbr, GFP_ATOMIC); } +static inline int virtblk_setup_discard_write_zeroes(struct request *req, bool unmap) +{ + unsigned short segments = blk_rq_nr_discard_segments(req), n = 0; + u32 block_size =...
2020 Feb 13
7
[PATCH 0/2] virtio-blk: improve handling of DMA mapping failures
Two patches are handling new edge cases introduced by doing DMA mappings (which can fail) in virtio core. I stumbled upon this while stress testing I/O for Protected Virtual Machines. I deliberately chose a tiny swiotlb size and have generated load with fio. With more than one virtio-blk disk in use I experienced hangs. The goal of this series is to fix those hangs. Halil Pasic (2):
2020 Feb 13
7
[PATCH 0/2] virtio-blk: improve handling of DMA mapping failures
Two patches are handling new edge cases introduced by doing DMA mappings (which can fail) in virtio core. I stumbled upon this while stress testing I/O for Protected Virtual Machines. I deliberately chose a tiny swiotlb size and have generated load with fio. With more than one virtio-blk disk in use I experienced hangs. The goal of this series is to fix those hangs. Halil Pasic (2):
2012 Aug 07
4
[PATCH V6 0/2] Improve virtio-blk performance
Hi, all This version reworked on REQ_FLUSH and REQ_FUA support as suggested by Christoph and dropped the block core bits since Jens has picked them up. Fio test shows bio-based IO path gives the following performance improvement: 1) Ramdisk device With bio-based IO path, sequential read/write, random read/write IOPS boost : 28%, 24%, 21%, 16% Latency improvement: 32%,