RFC Save megabytes of wasted sg entries
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest7 patches 10 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | drm/i915: Extract sg creation into a helperdrivers/ | +109 | 3 replies | |
| 2/7 | drm/i915: Use i915_sg_create for userptrdrivers/ drivers/ drivers/ | +87 | 0 replies | |
| 3/7 | drm/i915: Use i915_sg_create for partial viewsdrivers/ drivers/ drivers/ | +47 | 0 replies | |
| 4/7 | drm/i915: Use i915_sg_create for rotated pages viewdrivers/ | +14 | 0 replies | |
| 5/7 | drm/i915: Use i915_sg_create for dmabufdrivers/ | +20 | 2 replies | |
| 6/7 | lib/scatterlist: Add sg_trim_tableinclude/ lib/ | +55 | 2 replies | |
| 7/7 | drm/i915: Trim sg table after creating itdrivers/ | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC 0/7] Save megabytes of wasted sg entries
From: Tvrtko Ursulin <[email protected]>
We can decrease the i915 slab usage by 1-6 MiB* easily by doing more sg list coalescing and having the tables at the correct size at the same time.
This series extracts the sg table building code into helper so that all places in i915 can benefit.
Another problem is that it is hard to know in advance how many entries we will need (due coalescing).
Rather than try to pre-scan the pages before creating the table, it looks easier to keep our pessimistic table sizing at creation, and trim the waste afterwards.
*** There is a bug here somewhere so please don't run it. ***
*** I am sending it as RFC only since my debug capabilities ***
*** are severely limited at the moment. ***
*) I measured the memory savings by looking at the unused number
of sg entries at some points:
* Logging into KDE there is 1-2 MiB of unused sg entries.
* Running the T-Rex benchamrk aroun 3 Mib.
* Similarly for Manhattan 5-6 MiB.
Tvrtko Ursulin (7):
drm/i915: Extract sg creation into a helper drm/i915: Use i915_sg_create for userptr drm/i915: Use i915_sg_create for partial views drm/i915: Use i915_sg_create for rotated pages view drm/i915: Use i915_sg_create for dmabuf lib/scatterlist: Add sg_trim_table drm/i915: Trim sg table after creating it
drivers/gpu/drm/i915/i915_drv.h | 34 +++++ drivers/gpu/drm/i915/i915_gem.c | 218 +++++++++++++++++++++++++------- drivers/gpu/drm/i915/i915_gem_dmabuf.c | 45 +++---- drivers/gpu/drm/i915/i915_gem_gtt.c | 76 ++++------- drivers/gpu/drm/i915/i915_gem_userptr.c | 51 ++------ include/linux/scatterlist.h | 2 + lib/scatterlist.c | 53 ++++++++ 7 files changed, 314 insertions(+), 165 deletions(-)
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx