[Intel-gfx] [PATCH v3] drm/i915: Report correct GGTT space usage
Chris Wilson
chris at chris-wilson.co.uk
Tue Jun 30 06:30:00 PDT 2015
On Tue, Jun 30, 2015 at 01:53:39PM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>
> Currently only normal views were accounted which under-accounts
> the usage as reported in debugfs and by the GET_APERTURE ioctl.
>
> Introduce new helper, i915_gem_obj_total_ggtt_size, and use it
> from call sites which want to know how much GGTT space are
> objects using.
>
> v2: Single loop in i915_gem_get_aperture_ioctl. (Chris Wilson)
>
> v3: Walk GGTT active/inactive lists in i915_gem_get_aperture_ioctl
> for better efficiency. (Chris Wilson, Daniel Vetter)
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
One final request, and then
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
Please make the total_gtt_size() static to i915_debugfs.c, I don't want
any new users :)
> ---
> Sorry guys for a period I was convinced "mm.bound_list" is actually
> "vm.bound_list". :)
Sometimes I wish it were. But atm, they are used for two distinct
purposes. The global list is for the shrinker, and the active/inactive
list is for eviction. All other use is coincidental.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list