Userptr bo slab use optimization
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 10 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | lib/scatterlist: Fix offset type in sg_alloc_table_from_pagesdrivers/ drivers/ include/ +1 more | +6 | 0 replies | |
| 2/4 | lib/scatterlist: Avoid potential scatterlist entry overflowinclude/ lib/ | +26 | 1 reply | |
| 3/4 | lib/scatterlist: Introduce and export __sg_alloc_table_from_pagesinclude/ lib/ | +52 | 4 replies | |
| 4/4 | drm/i915: Use __sg_alloc_table_from_pages for userptr allocationsdrivers/ drivers/ drivers/ | +45 | 1 reply |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Marek Szyprowski | Chris Wilson | Mauro Carvalho Chehab | Ben Widawsky |
|---|---|---|---|---|
| Series | A-b | |||
| 1/4 | A-b | R-b | R-b | |
| 2/4 | R-b R-b | |||
| 3/4 | R-b R-b | |||
| 4/4 | R-b R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH 0/4] Userptr bo slab use optimization
From: Tvrtko Ursulin <[email protected]>
Yet another attempt to get this series reviewed and merged...
I've heard Vulkan might be creating a lot of userptr objects so might be interesting to check what benefit it brings to those use cases.
As an introduction, this allows i915 to create fewer sg table entries for the bo backing store representation. As such it primarily saves kernel slab memory.
When we added this optimisation to normal i915 bos, the savings were as far as I remember around 1-2MiB of slab after booting to KDE desktop, and 2-4Mib on neverball (game) main screen (or maybe it was while playing).
So thinking is, if Vulkan is indeed using a lot of userptr bos, it should translate to similar savings there. It is not much but the motto is that every little helps.
On the low level the saving will be up to around 32 bytes for each 4k of an userptr bo (1GiB of userptr bos = up to ~8MiB of slab saving), with the actual number depending on the backing store fragmentation.
Tvrtko Ursulin (4):
lib/scatterlist: Fix offset type in sg_alloc_table_from_pages lib/scatterlist: Avoid potential scatterlist entry overflow lib/scatterlist: Introduce and export __sg_alloc_table_from_pages drm/i915: Use __sg_alloc_table_from_pages for userptr allocations
drivers/gpu/drm/i915/i915_drv.h | 15 +++++ drivers/gpu/drm/i915/i915_gem.c | 6 +- drivers/gpu/drm/i915/i915_gem_userptr.c | 79 +++++++++-------------- drivers/media/v4l2-core/videobuf2-dma-contig.c | 4 +- drivers/rapidio/devices/rio_mport_cdev.c | 4 +- include/linux/scatterlist.h | 17 +++-- lib/scatterlist.c | 87 +++++++++++++++++++------- 7 files changed, 126 insertions(+), 86 deletions(-)
Signature · 6 lines
2.9.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx