search for: max_segment

Displaying 20 results from an estimated 52 matches for "max_segment".

2020 Aug 18
2
[PATCH v2 1/2] drm: allow limiting the scatter list size.
Add max_segment argument to drm_prime_pages_to_sg(). When set pass it through to the __sg_alloc_table_from_pages() call, otherwise use SCATTERLIST_MAX_SEGMENT. Also add max_segment field to drm driver and pass it to drm_prime_pages_to_sg() calls in drivers and helpers. v2: place max_segment in drm driver not ge...
2020 Aug 18
2
[PATCH 1/2] drm: allow limiting the scatter list size.
Add max_segment argument to drm_prime_pages_to_sg(). When set pass it through to the __sg_alloc_table_from_pages() call, otherwise use SCATTERLIST_MAX_SEGMENT. Also add max_segment field to gem objects and pass it to drm_prime_pages_to_sg() calls in drivers and helpers. Signed-off-by: Gerd Hoffmann <kraxel a...
2020 Sep 07
0
[PATCH v3 1/2] drm: allow limiting the scatter list size.
Add max_segment argument to drm_prime_pages_to_sg(). When set pass it through to the __sg_alloc_table_from_pages() call, otherwise use SCATTERLIST_MAX_SEGMENT. Also add max_segment field to drm driver and pass it to drm_prime_pages_to_sg() calls in drivers and helpers. v2: place max_segment in drm driver not ge...
2020 Sep 01
0
[PATCH v2 1/2] drm: allow limiting the scatter list size.
On Tue, Aug 18, 2020 at 11:20:16AM +0200, Gerd Hoffmann wrote: > Add max_segment argument to drm_prime_pages_to_sg(). When set pass it > through to the __sg_alloc_table_from_pages() call, otherwise use > SCATTERLIST_MAX_SEGMENT. > > Also add max_segment field to drm driver and pass it to > drm_prime_pages_to_sg() calls in drivers and helpers. > > v2: pla...
2020 Aug 18
0
[PATCH 1/2] drm: allow limiting the scatter list size.
Am 18.08.20 um 09:48 schrieb Gerd Hoffmann: > Add max_segment argument to drm_prime_pages_to_sg(). When set pass it > through to the __sg_alloc_table_from_pages() call, otherwise use > SCATTERLIST_MAX_SEGMENT. > > Also add max_segment field to gem objects and pass it to > drm_prime_pages_to_sg() calls in drivers and helpers. > > Signed-o...
2020 Sep 07
1
[PATCH v2 1/2] drm: allow limiting the scatter list size.
> > + /** > > + * @max_segment: > > + * > > + * Max size for scatter list segments. When unset the default > > + * (SCATTERLIST_MAX_SEGMENT) is used. > > + */ > > + size_t max_segment; > > Is there no better place for this then "at the bottom"? drm_device is a > huge structu...
2020 Aug 18
0
[PATCH v2 2/2] drm/virtio: set max_segment
When initializing call virtio_max_dma_size() to figure the scatter list limit. Needed to make virtio-gpu work properly with SEV. v2: place max_segment in drm driver not gem object. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_kms.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c index bf060c69850f..5a4364c00fae 100644...
2020 Sep 07
0
[PATCH v3 2/2] drm/virtio: set max_segment
When initializing call virtio_max_dma_size() to figure the scatter list limit. Needed to make virtio-gpu work properly with SEV. v2: place max_segment in drm driver not gem object. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_kms.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c index 75d0dc2f6d28..151471acdfcf 100644...
2013 Feb 09
1
[blkfront] max_segments & max_segment_size
Hi, I have (very) poor write performance with Xen PV, used over RBD, and I suppose it''s because of very short values for max_segments and max_segment_size. (I have 250MB/s write speed in Dom0 vs 40MB/s write speed in DomU) From what I read, there is already a patch to fix that, called "multi page ring support for block devices" : http://lists.xen.org/archives/html/xen-devel/2012-03/msg00388.html But it doesn'...
2019 Aug 08
1
[PATCH] drm/virtio: use virtio_max_dma_size
...tgpu_object.c index b2da31310d24..6e44568813dd 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -204,6 +204,7 @@ int virtio_gpu_object_get_sg_table(struct virtio_gpu_device *qdev, .interruptible = false, .no_wait_gpu = false }; + unsigned max_segment; /* wtf swapping */ if (bo->pages) @@ -215,8 +216,13 @@ int virtio_gpu_object_get_sg_table(struct virtio_gpu_device *qdev, if (!bo->pages) goto out; - ret = sg_alloc_table_from_pages(bo->pages, pages, nr_pages, 0, - nr_pages << PAGE_SHIFT, GFP_KERNEL); + max_segment...
2019 Aug 09
0
[PATCH v2] drm/virtio: use virtio_max_dma_size
...tgpu_object.c index b2da31310d24..6e44568813dd 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -204,6 +204,7 @@ int virtio_gpu_object_get_sg_table(struct virtio_gpu_device *qdev, .interruptible = false, .no_wait_gpu = false }; + unsigned max_segment; /* wtf swapping */ if (bo->pages) @@ -215,8 +216,13 @@ int virtio_gpu_object_get_sg_table(struct virtio_gpu_device *qdev, if (!bo->pages) goto out; - ret = sg_alloc_table_from_pages(bo->pages, pages, nr_pages, 0, - nr_pages << PAGE_SHIFT, GFP_KERNEL); + max_segment...
2019 Aug 13
0
[PATCH v3] drm/virtio: use virtio_max_dma_size
...tgpu_object.c index b2da31310d24..3d86e4b3de58 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -204,6 +204,7 @@ int virtio_gpu_object_get_sg_table(struct virtio_gpu_device *qdev, .interruptible = false, .no_wait_gpu = false }; + unsigned max_segment; /* wtf swapping */ if (bo->pages) @@ -215,8 +216,13 @@ int virtio_gpu_object_get_sg_table(struct virtio_gpu_device *qdev, if (!bo->pages) goto out; - ret = sg_alloc_table_from_pages(bo->pages, pages, nr_pages, 0, - nr_pages << PAGE_SHIFT, GFP_KERNEL); + max_segment...
2019 Aug 13
0
[PATCH v4] drm/virtio: use virtio_max_dma_size
...irtgpu_object.c index b2da31310d24..09b526518f5a 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -204,6 +204,7 @@ int virtio_gpu_object_get_sg_table(struct virtio_gpu_device *qdev, .interruptible = false, .no_wait_gpu = false }; + size_t max_segment; /* wtf swapping */ if (bo->pages) @@ -215,8 +216,13 @@ int virtio_gpu_object_get_sg_table(struct virtio_gpu_device *qdev, if (!bo->pages) goto out; - ret = sg_alloc_table_from_pages(bo->pages, pages, nr_pages, 0, - nr_pages << PAGE_SHIFT, GFP_KERNEL); + max_segment...
2019 Sep 04
0
[PATCH AUTOSEL 5.2 36/94] drm/virtio: use virtio_max_dma_size
...tgpu_object.c index b2da31310d24c..09b526518f5a6 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -204,6 +204,7 @@ int virtio_gpu_object_get_sg_table(struct virtio_gpu_device *qdev, .interruptible = false, .no_wait_gpu = false }; + size_t max_segment; /* wtf swapping */ if (bo->pages) @@ -215,8 +216,13 @@ int virtio_gpu_object_get_sg_table(struct virtio_gpu_device *qdev, if (!bo->pages) goto out; - ret = sg_alloc_table_from_pages(bo->pages, pages, nr_pages, 0, - nr_pages << PAGE_SHIFT, GFP_KERNEL); + max_segment...
2020 Aug 18
0
[PATCH 2/2] drm/virtio: set max_segment
...bject.c index 1359eb8f1a02..26b608e2554e 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -214,6 +214,7 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, goto err_free_gem; bo->dumb = params->dumb; + shmem_obj->base.max_segment = virtio_max_dma_size(vgdev->vdev); if (fence) { ret = -ENOMEM; -- 2.18.4
2020 Sep 07
2
[PATCH v4 1/1] drm: allow limiting the scatter list size.
...to_sg(), so we can call dma_max_mapping_size() to figure the segment size limit and call into __sg_alloc_table_from_pages() with the correct limit. This fixes virtio-gpu with sev. Possibly it'll fix other bugs too given that drm seems to totaly ignore segment size limits so far ... v2: place max_segment in drm driver not gem object. v3: move max_segment next to the other gem fields. v4: just use dma_max_mapping_size(). Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- include/drm/drm_prime.h | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 3 ++- drivers/g...
2012 Aug 21
5
[PATCH 1/2 v1] blkdrv: Add queue limits parameters for sg block drive
...+ continue; + } + + break; + } + + closedir(ffs); + + pstrcat(path, MAXPATHLEN, d->d_name); + pstrcat(path, MAXPATHLEN, "/queue/"); + + read_queue_limit(path, "max_sectors_kb", &bs->max_sectors); + read_queue_limit(path, "max_segments", &bs->max_segments); + read_queue_limit(path, "max_segment_size", &bs->max_segment_size); +} + static int hdev_open(BlockDriverState *bs, const char *filename, int flags) { BDRVRawState *s = bs->opaque; @@ -868,6 +925,7 @@ static int hdev_open(BlockDriver...
2012 Aug 21
5
[PATCH 1/2 v1] blkdrv: Add queue limits parameters for sg block drive
...+ continue; + } + + break; + } + + closedir(ffs); + + pstrcat(path, MAXPATHLEN, d->d_name); + pstrcat(path, MAXPATHLEN, "/queue/"); + + read_queue_limit(path, "max_sectors_kb", &bs->max_sectors); + read_queue_limit(path, "max_segments", &bs->max_segments); + read_queue_limit(path, "max_segment_size", &bs->max_segment_size); +} + static int hdev_open(BlockDriverState *bs, const char *filename, int flags) { BDRVRawState *s = bs->opaque; @@ -868,6 +925,7 @@ static int hdev_open(BlockDriver...
2012 Aug 16
0
[RFC v1 3/5] VBD: enlarge max segment per request in blkfront
...wake_up(&blkbk->pending_free_wq); } - +/* + * Retrieve from the ''pending_reqs'' a free pending_req structure to be used. + */ +static struct pending_req *alloc_req(void) +{ + struct pending_req *req = NULL; + unsigned long flags; + unsigned int max_seg = BLKIF_MAX_SEGMENTS_PER_REQUEST; + + spin_lock_irqsave(&blkbk->pending_free_lock, flags); + if (!list_empty(&blkbk->pending_free)) { + req = list_entry(blkbk->pending_free.next, struct pending_req, + free_list); + list_del(&req->free_list); + } +...
2020 Sep 07
0
[PATCH v4 1/1] drm: allow limiting the scatter list size.
...g_size() to figure the segment size limit > and call into __sg_alloc_table_from_pages() with the correct > limit. > > This fixes virtio-gpu with sev. Possibly it'll fix other bugs > too given that drm seems to totaly ignore segment size limits > so far ... > > v2: place max_segment in drm driver not gem object. > v3: move max_segment next to the other gem fields. > v4: just use dma_max_mapping_size(). > > Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> Uh, are you sure this works in all cases for virtio? The comments I've found suggest very much not...