search for: part_bits

Displaying 20 results from an estimated 65 matches for "part_bits".

2011 Oct 30
2
[PATCHv4] virtio-blk: use ida to allocate disk index
...c b/drivers/block/virtio_blk.c index 079c088..e7a5750 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -8,10 +8,13 @@ #include <linux/scatterlist.h> #include <linux/string_helpers.h> #include <scsi/scsi_cmnd.h> +#include <linux/idr.h> #define PART_BITS 4 -static int major, index; +static int major; +static DEFINE_IDA(vd_index_ida); + struct workqueue_struct *virtblk_wq; struct virtio_blk @@ -35,6 +38,9 @@ struct virtio_blk /* What host tells us, plus 2 for header & tailer. */ unsigned int sg_elems; + /* Ida index - used to track m...
2011 Oct 30
2
[PATCHv4] virtio-blk: use ida to allocate disk index
...c b/drivers/block/virtio_blk.c index 079c088..e7a5750 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -8,10 +8,13 @@ #include <linux/scatterlist.h> #include <linux/string_helpers.h> #include <scsi/scsi_cmnd.h> +#include <linux/idr.h> #define PART_BITS 4 -static int major, index; +static int major; +static DEFINE_IDA(vd_index_ida); + struct workqueue_struct *virtblk_wq; struct virtio_blk @@ -35,6 +38,9 @@ struct virtio_blk /* What host tells us, plus 2 for header & tailer. */ unsigned int sg_elems; + /* Ida index - used to track m...
2008 Jan 31
4
[PATCH] virtio_blk: Dont waste major numbers
...ns(-) Index: kvm/drivers/block/virtio_blk.c =================================================================== --- kvm.orig/drivers/block/virtio_blk.c +++ kvm/drivers/block/virtio_blk.c @@ -7,10 +7,13 @@ #include <linux/scatterlist.h> #define VIRTIO_MAX_SG (3+MAX_PHYS_SEGMENTS) +#define PART_BITS 4 MODULE_LICENSE("GPL"); static unsigned char virtblk_index = 'a'; +static int major, minor; + struct virtio_blk { spinlock_t lock; @@ -173,10 +176,13 @@ static struct block_device_operations vi static int virtblk_probe(struct virtio_device *vdev) { struct virtio_blk...
2008 Jan 31
4
[PATCH] virtio_blk: Dont waste major numbers
...ns(-) Index: kvm/drivers/block/virtio_blk.c =================================================================== --- kvm.orig/drivers/block/virtio_blk.c +++ kvm/drivers/block/virtio_blk.c @@ -7,10 +7,13 @@ #include <linux/scatterlist.h> #define VIRTIO_MAX_SG (3+MAX_PHYS_SEGMENTS) +#define PART_BITS 4 MODULE_LICENSE("GPL"); static unsigned char virtblk_index = 'a'; +static int major, minor; + struct virtio_blk { spinlock_t lock; @@ -173,10 +176,13 @@ static struct block_device_operations vi static int virtblk_probe(struct virtio_device *vdev) { struct virtio_blk...
2011 Jun 01
6
[PATCH 1/1] [virt] virtio-blk: Use ida to allocate disk index
...c b/drivers/block/virtio_blk.c index 079c088..ba734b3 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -8,10 +8,14 @@ #include <linux/scatterlist.h> #include <linux/string_helpers.h> #include <scsi/scsi_cmnd.h> +#include <linux/idr.h> #define PART_BITS 4 -static int major, index; +static int major; +static DEFINE_SPINLOCK(vd_index_lock); +static DEFINE_IDA(vd_index_ida); + struct workqueue_struct *virtblk_wq; struct virtio_blk @@ -23,6 +27,7 @@ struct virtio_blk /* The disk structure for the kernel. */ struct gendisk *disk; + u32 inde...
2011 Jun 01
6
[PATCH 1/1] [virt] virtio-blk: Use ida to allocate disk index
...c b/drivers/block/virtio_blk.c index 079c088..ba734b3 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -8,10 +8,14 @@ #include <linux/scatterlist.h> #include <linux/string_helpers.h> #include <scsi/scsi_cmnd.h> +#include <linux/idr.h> #define PART_BITS 4 -static int major, index; +static int major; +static DEFINE_SPINLOCK(vd_index_lock); +static DEFINE_IDA(vd_index_ida); + struct workqueue_struct *virtblk_wq; struct virtio_blk @@ -23,6 +27,7 @@ struct virtio_blk /* The disk structure for the kernel. */ struct gendisk *disk; + u32 inde...
2014 Jun 17
2
[RFC PATCH 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...----------- > 1 file changed, 55 insertions(+), 20 deletions(-) > > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > index f63d358..e0d077d 100644 > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -16,6 +16,8 @@ > > #define PART_BITS 4 > > +#define MAX_NUM_VQ 16 It would be nice to allocate virtqueues dynamically instead of hardcoding the limit. virtio-scsi also allocates virtqueues dynamically. Stefan
2014 Jun 17
2
[RFC PATCH 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...----------- > 1 file changed, 55 insertions(+), 20 deletions(-) > > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > index f63d358..e0d077d 100644 > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -16,6 +16,8 @@ > > #define PART_BITS 4 > > +#define MAX_NUM_VQ 16 It would be nice to allocate virtqueues dynamically instead of hardcoding the limit. virtio-scsi also allocates virtqueues dynamically. Stefan
2010 Jun 18
4
[PATCH 1/2] Add 'serial' attribute to virtio-blk devices
...1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 258bc2a..f1ef26f 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -281,6 +281,31 @@ static int index_to_minor(int index) return index << PART_BITS; } +/* Copy serial number from *s to *d. Copy operation terminates on either + * encountering a nul in *s or after n bytes have been copied, whichever + * occurs first. *d is not forcibly nul terminated. Return # of bytes copied. + */ +static inline int serial_sysfs(char *d, char *s, int n) +...
2010 Jun 18
4
[PATCH 1/2] Add 'serial' attribute to virtio-blk devices
...1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 258bc2a..f1ef26f 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -281,6 +281,31 @@ static int index_to_minor(int index) return index << PART_BITS; } +/* Copy serial number from *s to *d. Copy operation terminates on either + * encountering a nul in *s or after n bytes have been copied, whichever + * occurs first. *d is not forcibly nul terminated. Return # of bytes copied. + */ +static inline int serial_sysfs(char *d, char *s, int n) +...
2014 Jun 20
3
[PATCH v1 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 20
3
[PATCH v1 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 20
0
[PATCH v1 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...c | 70 +++++++++++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 20 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index f63d358..7c3d686 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -16,6 +16,8 @@ #define PART_BITS 4 +#define MAX_NUM_VQ 16 + static int major; static DEFINE_IDA(vd_index_ida); @@ -24,8 +26,8 @@ static struct workqueue_struct *virtblk_wq; struct virtio_blk { struct virtio_device *vdev; - struct virtqueue *vq; - spinlock_t vq_lock; + struct virtqueue *vq[MAX_NUM_VQ]; + spinlock_t vq_loc...
2014 Jun 13
0
[RFC PATCH 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...c | 75 ++++++++++++++++++++++++++++++++------------ 1 file changed, 55 insertions(+), 20 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index f63d358..e0d077d 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -16,6 +16,8 @@ #define PART_BITS 4 +#define MAX_NUM_VQ 16 + static int major; static DEFINE_IDA(vd_index_ida); @@ -24,8 +26,8 @@ static struct workqueue_struct *virtblk_wq; struct virtio_blk { struct virtio_device *vdev; - struct virtqueue *vq; - spinlock_t vq_lock; + struct virtqueue *vq[MAX_NUM_VQ]; + spinlock_t vq_loc...
2014 Jun 22
2
[PATCH v1 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...-------- > 1 file changed, 50 insertions(+), 20 deletions(-) > > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > index f63d358..7c3d686 100644 > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -16,6 +16,8 @@ > > #define PART_BITS 4 > > +#define MAX_NUM_VQ 16 > + > static int major; > static DEFINE_IDA(vd_index_ida); > Does it work much worse if we just use as many queues as hardware supports, allocating as much memory as necessary? > @@ -24,8 +26,8 @@ static struct workqueue_struct *virtblk_wq;...
2014 Jun 22
2
[PATCH v1 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...-------- > 1 file changed, 50 insertions(+), 20 deletions(-) > > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > index f63d358..7c3d686 100644 > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -16,6 +16,8 @@ > > #define PART_BITS 4 > > +#define MAX_NUM_VQ 16 > + > static int major; > static DEFINE_IDA(vd_index_ida); > Does it work much worse if we just use as many queues as hardware supports, allocating as much memory as necessary? > @@ -24,8 +26,8 @@ static struct workqueue_struct *virtblk_wq;...
2014 Jun 26
0
[PATCH v3 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...+++++++++++--------- 1 file changed, 84 insertions(+), 20 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index f63d358..0a58140 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -15,17 +15,22 @@ #include <linux/numa.h> #define PART_BITS 4 +#define VQ_NAME_LEN 16 static int major; static DEFINE_IDA(vd_index_ida); static struct workqueue_struct *virtblk_wq; +struct virtio_blk_vq { + struct virtqueue *vq; + spinlock_t lock; + char name[VQ_NAME_LEN]; +} ____cacheline_aligned_in_smp; + struct virtio_blk { struct virtio_dev...
2014 Jun 13
6
[RFC PATCH 0/2] block: virtio-blk: support multi vq per virtio-blk
Hi, This 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 problems on virtio-blk device 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
2014 Jun 13
6
[RFC PATCH 0/2] block: virtio-blk: support multi vq per virtio-blk
Hi, This 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 problems on virtio-blk device 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
2014 Jun 26
6
[PATCH v3 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