Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/5] drm/i915: Interface to get GFX shmem usage stats per process
@ 2018-03-22 14:14 Praveen Paneri
  2018-03-22 14:14 ` [RFC 1/5] drm/i915: Sysfs interface " Praveen Paneri
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Praveen Paneri @ 2018-03-22 14:14 UTC (permalink / raw)
  To: intel-gfx; +Cc: daniel.vetter, nidhi1.gupta

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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2018-03-26 14:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-22 14:14 [RFC 0/5] drm/i915: Interface to get GFX shmem usage stats per process Praveen Paneri
2018-03-22 14:14 ` [RFC 1/5] drm/i915: Sysfs interface " Praveen Paneri
2018-03-22 14:15   ` Chris Wilson
2018-03-22 14:14 ` [RFC 2/5] drm/i915: Calculate total shmem GFX memory consumed Praveen Paneri
2018-03-22 14:14 ` [RFC 3/5] drm/i915: Sysfs interface to get detailed GFX buffer info per process Praveen Paneri
2018-03-22 14:14 ` [RFC 4/5] drm/i915: Output the user virtual addresses for GFX buffers Praveen Paneri
2018-03-22 14:14 ` [RFC 5/5] drm/i915: Update process mm stats for Gen GFX memory Praveen Paneri
2018-03-22 14:45 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Interface to get GFX shmem usage stats per process Patchwork
2018-03-26 14:45   ` Jani Nikula
2018-03-22 14:47 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-03-22 15:07 ` ✗ Fi.CI.BAT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox