search for: blk_queue_max_hw_seg

Displaying 20 results from an estimated 54 matches for "blk_queue_max_hw_seg".

2008 Nov 14
2
[PATCH RFC] virtio: use QUEUE_FLAG_CLUSTER in virtio_blk
...kernel image 100 times (with sync between) Before: totsegs = 55661 totlen = 148859962 avg. 2674 After: totsegs = 36097 totlen = 139439355 avg: 3862 Unfortunately, this coalescing is done at blk_rq_map_sg() which is too late to be optimal: requests have already been limited to the value set by blk_queue_max_hw_segments(). For us, that value reflects the number of sg slots we can handle (ie. after clustering). I suspect other drivers have the same issue. Jens? (This patch is a one liner + temporary stats-gathering cruft for show) Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> --- drivers/...
2008 Nov 14
2
[PATCH RFC] virtio: use QUEUE_FLAG_CLUSTER in virtio_blk
...kernel image 100 times (with sync between) Before: totsegs = 55661 totlen = 148859962 avg. 2674 After: totsegs = 36097 totlen = 139439355 avg: 3862 Unfortunately, this coalescing is done at blk_rq_map_sg() which is too late to be optimal: requests have already been limited to the value set by blk_queue_max_hw_segments(). For us, that value reflects the number of sg slots we can handle (ie. after clustering). I suspect other drivers have the same issue. Jens? (This patch is a one liner + temporary stats-gathering cruft for show) Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> --- drivers/...
2008 May 27
1
[PATCH/RFC] virtio_blk: check for hardsector size from host
....c +++ kvm/drivers/block/virtio_blk.c @@ -196,6 +196,7 @@ static int virtblk_probe(struct virtio_d int err; u64 cap; u32 v; + u64 blk_size; if (index_to_minor(index) >= 1 << MINORBITS) return -ENOSPC; @@ -290,6 +291,13 @@ static int virtblk_probe(struct virtio_d if (!err) blk_queue_max_hw_segments(vblk->disk->queue, v); + /* Host can optionally specify the block size of the device */ + err = virtio_config_val(vdev, VIRTIO_BLK_F_BLK_SIZE, + offsetof(struct virtio_blk_config, blk_size), + &blk_size); + if (!err) + blk_queue_hardsect_size(vblk->disk->queue, blk_siz...
2008 May 27
1
[PATCH/RFC] virtio_blk: check for hardsector size from host
....c +++ kvm/drivers/block/virtio_blk.c @@ -196,6 +196,7 @@ static int virtblk_probe(struct virtio_d int err; u64 cap; u32 v; + u64 blk_size; if (index_to_minor(index) >= 1 << MINORBITS) return -ENOSPC; @@ -290,6 +291,13 @@ static int virtblk_probe(struct virtio_d if (!err) blk_queue_max_hw_segments(vblk->disk->queue, v); + /* Host can optionally specify the block size of the device */ + err = virtio_config_val(vdev, VIRTIO_BLK_F_BLK_SIZE, + offsetof(struct virtio_blk_config, blk_size), + &blk_size); + if (!err) + blk_queue_hardsect_size(vblk->disk->queue, blk_siz...
2007 Jul 29
1
[PATCH] BLOCK=n , LGUEST=m/y compile error
...ror: dereferencing pointer to incomplete type drivers/block/lguest_blk.c:322: error: implicit declaration of function 'blk_init_queue' drivers/block/lguest_blk.c:323: error: dereferencing pointer to incomplete type drivers/block/lguest_blk.c:335: error: implicit declaration of function 'blk_queue_max_hw_segments' drivers/block/lguest_blk.c:335: error: dereferencing pointer to incomplete type drivers/block/lguest_blk.c:341: error: implicit declaration of function 'blk_queue_segment_boundary' drivers/block/lguest_blk.c:341: error: dereferencing pointer to incomplete type drivers/block/lguest...
2007 Jul 29
1
[PATCH] BLOCK=n , LGUEST=m/y compile error
...ror: dereferencing pointer to incomplete type drivers/block/lguest_blk.c:322: error: implicit declaration of function 'blk_init_queue' drivers/block/lguest_blk.c:323: error: dereferencing pointer to incomplete type drivers/block/lguest_blk.c:335: error: implicit declaration of function 'blk_queue_max_hw_segments' drivers/block/lguest_blk.c:335: error: dereferencing pointer to incomplete type drivers/block/lguest_blk.c:341: error: implicit declaration of function 'blk_queue_segment_boundary' drivers/block/lguest_blk.c:341: error: dereferencing pointer to incomplete type drivers/block/lguest...
2007 May 09
3
[patch 8/9] lguest: the block driver
...disk(1); + if (!bd->disk) { + err = -ENOMEM; + goto out_unregister_blkdev; + } + + bd->disk->queue = blk_init_queue(do_lgb_request, &bd->lock); + if (!bd->disk->queue) { + err = -ENOMEM; + goto out_put_disk; + } + + /* We can only handle a certain number of sg entries */ + blk_queue_max_hw_segments(bd->disk->queue, LGUEST_MAX_DMA_SECTIONS); + /* Buffers must not cross page boundaries */ + blk_queue_segment_boundary(bd->disk->queue, PAGE_SIZE-1); + + sprintf(bd->disk->disk_name, "lgb%c", next_block_index++); + if (lguest_devices[lgdev->index].features &...
2007 May 09
3
[patch 8/9] lguest: the block driver
...disk(1); + if (!bd->disk) { + err = -ENOMEM; + goto out_unregister_blkdev; + } + + bd->disk->queue = blk_init_queue(do_lgb_request, &bd->lock); + if (!bd->disk->queue) { + err = -ENOMEM; + goto out_put_disk; + } + + /* We can only handle a certain number of sg entries */ + blk_queue_max_hw_segments(bd->disk->queue, LGUEST_MAX_DMA_SECTIONS); + /* Buffers must not cross page boundaries */ + blk_queue_segment_boundary(bd->disk->queue, PAGE_SIZE-1); + + sprintf(bd->disk->disk_name, "lgb%c", next_block_index++); + if (lguest_devices[lgdev->index].features &...
2008 Dec 29
0
[PULL] virtio and lguest tree
...ev->config->find_vq(vdev, 0, blk_done); @@ -277,6 +289,13 @@ static int virtblk_probe(struct virtio_device *vdev) } set_capacity(vblk->disk, cap); + /* We can handle whatever the host told us to handle. */ + blk_queue_max_phys_segments(vblk->disk->queue, vblk->sg_elems-2); + blk_queue_max_hw_segments(vblk->disk->queue, vblk->sg_elems-2); + + /* No real sector limit. */ + blk_queue_max_sectors(vblk->disk->queue, -1U); + /* Host can optionally specify maximum segment size and number of * segments. */ err = virtio_config_val(vdev, VIRTIO_BLK_F_SIZE_MAX, @@ -284,12 +303,8...
2008 Dec 29
0
[PULL] virtio and lguest tree
...ev->config->find_vq(vdev, 0, blk_done); @@ -277,6 +289,13 @@ static int virtblk_probe(struct virtio_device *vdev) } set_capacity(vblk->disk, cap); + /* We can handle whatever the host told us to handle. */ + blk_queue_max_phys_segments(vblk->disk->queue, vblk->sg_elems-2); + blk_queue_max_hw_segments(vblk->disk->queue, vblk->sg_elems-2); + + /* No real sector limit. */ + blk_queue_max_sectors(vblk->disk->queue, -1U); + /* Host can optionally specify maximum segment size and number of * segments. */ err = virtio_config_val(vdev, VIRTIO_BLK_F_SIZE_MAX, @@ -284,12 +303,8...
2007 Jul 06
6
[RFC 0/4] Using a generic bus_type for virtio
This is a subject that came up in the virtio BOF session at OLS. I decided to go forward and implement something that I like, based on the latest virtio proposal at the time, which was draft III. It's not a drop-in replacement, because it's missing a host implementation. I first started my own, which is not done yet, but wanted to do one for lguest and one for emulated PCI next. It's
2007 Jul 06
6
[RFC 0/4] Using a generic bus_type for virtio
This is a subject that came up in the virtio BOF session at OLS. I decided to go forward and implement something that I like, based on the latest virtio proposal at the time, which was draft III. It's not a drop-in replacement, because it's missing a host implementation. I first started my own, which is not done yet, but wanted to do one for lguest and one for emulated PCI next. It's
2007 Jul 03
6
[PATCH 1/3] Virtio draft IV
In response to Avi's excellent analysis, I've updated virtio as promised (apologies for the delay, travel got in the way). === This attempts to implement a "virtual I/O" layer which should allow common drivers to be efficiently used across most virtual I/O mechanisms. It will no-doubt need further enhancement. The details of probing the device are left to hypervisor-specific
2007 Jul 03
6
[PATCH 1/3] Virtio draft IV
In response to Avi's excellent analysis, I've updated virtio as promised (apologies for the delay, travel got in the way). === This attempts to implement a "virtual I/O" layer which should allow common drivers to be efficiently used across most virtual I/O mechanisms. It will no-doubt need further enhancement. The details of probing the device are left to hypervisor-specific
2007 Nov 10
2
[PATCH] Change virtio_pci to use a shared memory area for config
This patch changes virtio_pci to use a shared memory area for virtio config info instead of using the PCI configuration space. This is closer semantically to what the virtio API exposes and is it a lot easier to implement on both ends. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index eb9a8e0..7e6e453 100644
2007 Nov 10
2
[PATCH] Change virtio_pci to use a shared memory area for config
This patch changes virtio_pci to use a shared memory area for virtio config info instead of using the PCI configuration space. This is closer semantically to what the virtio API exposes and is it a lot easier to implement on both ends. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index eb9a8e0..7e6e453 100644
2007 Jun 07
4
[PATCH RFC 0/3] Virtio draft II
Hi again all, It turns out that networking really wants ordered requests, which the previous patches didn't allow. This patch changes it to a callback mechanism; kudos to Avi. The downside is that locking is more complicated, and after a few dead ends I implemented the simplest solution: the struct virtio_device contains the spinlock to use, and it's held when your callbacks get
2007 Jun 07
4
[PATCH RFC 0/3] Virtio draft II
Hi again all, It turns out that networking really wants ordered requests, which the previous patches didn't allow. This patch changes it to a callback mechanism; kudos to Avi. The downside is that locking is more complicated, and after a few dead ends I implemented the simplest solution: the struct virtio_device contains the spinlock to use, and it's held when your callbacks get
2007 Jun 07
4
[PATCH RFC 0/3] Virtio draft II
Hi again all, It turns out that networking really wants ordered requests, which the previous patches didn't allow. This patch changes it to a callback mechanism; kudos to Avi. The downside is that locking is more complicated, and after a few dead ends I implemented the simplest solution: the struct virtio_device contains the spinlock to use, and it's held when your callbacks get
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 1/13] [Mostly resend] virtio additions
...onfig\n"); - goto out_cleanup_queue; - } - err = virtio_config_val(vdev, VIRTIO_CONFIG_BLK_F_SEG_MAX, &v); + err = virtio_config_val(vdev, VIRTIO_BLK_F_SEG_MAX, + offsetof(struct virtio_blk_config, seg_max), + &v); if (!err) blk_queue_max_hw_segments(vblk->disk->queue, v); - else if (err != -ENOENT) { - dev_err(&vdev->dev, "Bad SEG_MAX in config\n"); - goto out_cleanup_queue; - } add_disk(vblk->disk); return 0; -out_cleanup_queue: - blk_cleanup_queue(vblk->disk->queue);...