All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Userptr bo slab use optimization
@ 2017-07-27  9:05 Tvrtko Ursulin
  2017-07-27  9:05   ` Tvrtko Ursulin
                   ` (5 more replies)
  0 siblings, 6 replies; 21+ messages in thread
From: Tvrtko Ursulin @ 2017-07-27  9:05 UTC (permalink / raw)
  To: Intel-gfx; +Cc: Ben Widawsky

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

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(-)

-- 
2.9.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2017-08-03  9:21 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-27  9:05 [PATCH 0/4] Userptr bo slab use optimization Tvrtko Ursulin
2017-07-27  9:05 ` [PATCH 1/4] lib/scatterlist: Fix offset type in sg_alloc_table_from_pages Tvrtko Ursulin
2017-07-27  9:05   ` Tvrtko Ursulin
2017-07-27  9:05 ` [PATCH 2/4] lib/scatterlist: Avoid potential scatterlist entry overflow Tvrtko Ursulin
2017-07-27  9:05   ` Tvrtko Ursulin
2017-07-28 10:53   ` [Intel-gfx] " Chris Wilson
2017-07-27  9:05 ` [PATCH 3/4] lib/scatterlist: Introduce and export __sg_alloc_table_from_pages Tvrtko Ursulin
2017-07-27  9:05   ` Tvrtko Ursulin
2017-07-28 11:07   ` Chris Wilson
2017-08-02 13:06   ` [Intel-gfx] " Tvrtko Ursulin
2017-08-02 23:01     ` Andrew Morton
2017-08-03  9:21       ` Tvrtko Ursulin
2017-08-03  9:21         ` Tvrtko Ursulin
2017-07-27  9:05 ` [PATCH 4/4] drm/i915: Use __sg_alloc_table_from_pages for userptr allocations Tvrtko Ursulin
2017-07-27  9:05   ` Tvrtko Ursulin
2017-07-28 11:06   ` Chris Wilson
2017-07-27  9:25 ` [PATCH 0/4] Userptr bo slab use optimization Chris Wilson
2017-07-27 10:46   ` Tvrtko Ursulin
2017-07-27 10:53     ` Chris Wilson
2017-08-01 18:16   ` Ben Widawsky
2017-07-27  9:39 ` ✓ Fi.CI.BAT: success for " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.