search for: err_name_array

Displaying 5 results from an estimated 5 matches for "err_name_array".

2014 Jun 26
1
[PATCH v2 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...); > + if (!vblk->vqs) { > + err = -ENOMEM; > + goto out; > + } > > + name_array = kmalloc(sizeof(char) * 32 * num_vqs, GFP_KERNEL); sizeof(char) is 1, just drop it. We don't do if (!NULL) just in case someone redefined it, either. > + if (!name_array) > + goto err_name_array; You want vmalloc here, it will fail on high # of vqs, and speed doesn't matter for names. > + > + names = kmalloc(sizeof(*names) * num_vqs, GFP_KERNEL); > + if (!names) > + goto err_names; > + > + callbacks = kmalloc(sizeof(*callbacks) * num_vqs, GFP_KERNEL); > + if (!c...
2014 Jun 26
1
[PATCH v2 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...); > + if (!vblk->vqs) { > + err = -ENOMEM; > + goto out; > + } > > + name_array = kmalloc(sizeof(char) * 32 * num_vqs, GFP_KERNEL); sizeof(char) is 1, just drop it. We don't do if (!NULL) just in case someone redefined it, either. > + if (!name_array) > + goto err_name_array; You want vmalloc here, it will fail on high # of vqs, and speed doesn't matter for names. > + > + names = kmalloc(sizeof(*names) * num_vqs, GFP_KERNEL); > + if (!names) > + goto err_names; > + > + callbacks = kmalloc(sizeof(*callbacks) * num_vqs, GFP_KERNEL); > + if (!c...
2014 Jun 26
0
[PATCH v2 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
..._blk_config, num_queues, + &num_vqs); + if (err) + num_vqs = 1; + + vblk->vqs = kmalloc(sizeof(*vblk->vqs) * num_vqs, GFP_KERNEL); + if (!vblk->vqs) { + err = -ENOMEM; + goto out; + } + name_array = kmalloc(sizeof(char) * 32 * num_vqs, GFP_KERNEL); + if (!name_array) + goto err_name_array; + + names = kmalloc(sizeof(*names) * num_vqs, GFP_KERNEL); + if (!names) + goto err_names; + + callbacks = kmalloc(sizeof(*callbacks) * num_vqs, GFP_KERNEL); + if (!callbacks) + goto err_callbacks; + + vqs = kmalloc(sizeof(*vqs) * num_vqs, GFP_KERNEL); + if (!vqs) + goto err_vqs; + + for (i = 0...
2014 Jun 26
7
[PATCH v2 0/2] block: virtio-blk: support multi vq per virtio-blk
Hi, These patches try to support multi virtual queues(multi-vq) in one virtio-blk device, and maps each virtual queue(vq) to blk-mq's hardware queue. With this approach, both scalability and performance on virtio-blk device can get improved. For verifying the improvement, I implements virtio-blk multi-vq over qemu's dataplane feature, and both handling host notification from each vq and
2014 Jun 26
7
[PATCH v2 0/2] block: virtio-blk: support multi vq per virtio-blk
Hi, These patches try to support multi virtual queues(multi-vq) in one virtio-blk device, and maps each virtual queue(vq) to blk-mq's hardware queue. With this approach, both scalability and performance on virtio-blk device can get improved. For verifying the improvement, I implements virtio-blk multi-vq over qemu's dataplane feature, and both handling host notification from each vq and