This series introduces a new gfx driver interface for tracking graphics memory usage at per process level. This interface is currently needed by android memtracker HAL and it can also be used with driver's shrinker interface (see patch 5). This feature was last floated to ML by Sourab and the discussion can be viewed here- https://lists.freedesktop.org/archives/intel-gfx/2014-September/051687.html Two major comments that I could see here are 1) Handling of cases where drm fd is shared across processes. 2) Sysfs is probably not a right place for this. Debugfs would be more appropriate? I have tried to address (1) by moving away from "per drm fd based object accounting" to "per process based object accounting". With that, gfx memory consumed by child process created by fork() gets accounted separately from the parent process even though they share the same fd. WIP on- - filesystem switch as mentioned in (2) above - some IGT failures observed with the series I would like to get early reviews and feedback on this while I work on above points. Credits: Sourab and Akash (Authors) Nidhi (Rebased to latest drm-tip) Praveen (Worked on review comments and other fixes) Sourab Gupta (5): drm/i915: Sysfs interface to get GFX shmem usage stats per process drm/i915: Calculate total shmem GFX memory consumed drm/i915: Sysfs interface to get detailed GFX buffer info per process drm/i915: Output the user virtual addresses for GFX buffers drm/i915: Update process mm stats for Gen GFX memory drivers/gpu/drm/i915/i915_debugfs.c | 15 - drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 25 + drivers/gpu/drm/i915/i915_gem.c | 1009 +++++++++++++++++++++++++++++- drivers/gpu/drm/i915/i915_gem_object.h | 2 + drivers/gpu/drm/i915/i915_gem_shrinker.c | 18 + drivers/gpu/drm/i915/i915_gpu_error.c | 23 +- drivers/gpu/drm/i915/i915_gpu_error.h | 6 + drivers/gpu/drm/i915/i915_params.c | 2 + drivers/gpu/drm/i915/i915_params.h | 3 +- drivers/gpu/drm/i915/i915_sysfs.c | 272 ++++++++ 11 files changed, 1356 insertions(+), 20 deletions(-) -- 1.9.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx