Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tejas Upadhyay <tejas.upadhyay@intel.com>
To: intel-xe@lists.freedesktop.org
Subject: [Intel-xe] [PATCH V2 0/7] drm/xe: fdinfo memory stats
Date: Tue, 12 Sep 2023 17:22:32 +0530	[thread overview]
Message-ID: <20230912115239.3554341-1-tejas.upadhyay@intel.com> (raw)

This series enables enables fdinfo memory stats for xe.

I added tracking of most classes of bo (user bo, page tables, ring, lrc)
which contribute to client's memory usage. This follows similar lines to
what Rob's msm code and tvrtko's i915 code is doing with some xe way
of showing and tracking/fecthing objects which adds to client memory
stats.

Example fdinfo format:

#cat /proc/4620/fdinfo/3
pos:    0
flags:  0100002
mnt_id: 23
ino:    1140
drm-driver:     xe
drm-client-id:  19
drm-pdev:       0000:4d:00.0
drm-total-system:       0
drm-shared-system:      0
drm-active-system:      0
drm-resident-system:    0
drm-purgeable-system:   0
drm-total-gtt:  4 KiB
drm-shared-gtt: 0
drm-active-gtt: 0
drm-resident-gtt:       4 KiB
drm-total-vram0:        20 KiB
drm-shared-vram0:       0
drm-active-vram0:       0
drm-resident-vram0:     20 KiB
drm-total-vram1:        20 KiB
drm-shared-vram1:       0
drm-active-vram1:       0
drm-resident-vram1:     20 KiB

Tejas Upadhyay (7):
  drm/xe: Add drm-client infrastructure
  drm/xe: Interface xe drm client with fdinfo interface
  drm/xe: Add tracking support for bos per client
  drm/xe: Record each drm client with its VM
  drm/xe: Track page table memory usage for client
  drm/xe: Account ring buffer and context state storage
  drm/xe: Implement fdinfo memory stats printing

 drivers/gpu/drm/xe/Makefile          |   1 +
 drivers/gpu/drm/xe/xe_bo.c           |   7 +
 drivers/gpu/drm/xe/xe_bo.h           |  11 ++
 drivers/gpu/drm/xe/xe_bo_types.h     |  10 ++
 drivers/gpu/drm/xe/xe_device.c       |  19 ++-
 drivers/gpu/drm/xe/xe_device_types.h |   6 +
 drivers/gpu/drm/xe/xe_drm_client.c   | 210 +++++++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_drm_client.h   |  71 +++++++++
 drivers/gpu/drm/xe/xe_lrc.c          |   7 +-
 drivers/gpu/drm/xe/xe_pt.c           |   4 +-
 drivers/gpu/drm/xe/xe_vm.c           |   8 +-
 drivers/gpu/drm/xe/xe_vm_types.h     |   2 +
 12 files changed, 352 insertions(+), 4 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/xe_drm_client.c
 create mode 100644 drivers/gpu/drm/xe/xe_drm_client.h

-- 
2.25.1


             reply	other threads:[~2023-09-12 11:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-12 11:52 Tejas Upadhyay [this message]
2023-09-12 11:52 ` [Intel-xe] [PATCH V2 1/7] drm/xe: Add drm-client infrastructure Tejas Upadhyay
2023-09-12 11:52 ` [Intel-xe] [PATCH V2 2/7] drm/xe: Interface xe drm client with fdinfo interface Tejas Upadhyay
2023-09-12 11:52 ` [Intel-xe] [PATCH V2 3/7] drm/xe: Add tracking support for bos per client Tejas Upadhyay
2023-09-13  8:39   ` Ghimiray, Himal Prasad
2023-09-12 11:52 ` [Intel-xe] [PATCH V2 4/7] drm/xe: Record each drm client with its VM Tejas Upadhyay
2023-09-13  8:58   ` Ghimiray, Himal Prasad
2023-09-12 11:52 ` [Intel-xe] [PATCH V2 5/7] drm/xe: Track page table memory usage for client Tejas Upadhyay
2023-09-13  8:38   ` Ghimiray, Himal Prasad
2023-09-12 11:52 ` [Intel-xe] [PATCH V2 6/7] drm/xe: Account ring buffer and context state storage Tejas Upadhyay
2023-09-12 11:52 ` [Intel-xe] [PATCH V2 7/7] drm/xe: Implement fdinfo memory stats printing Tejas Upadhyay
2023-09-12 12:06 ` [Intel-xe] ✓ CI.Patch_applied: success for drm/xe: fdinfo memory stats (rev2) Patchwork
2023-09-12 12:07 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-09-12 12:08 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-09-12 12:15 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-09-12 12:15 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-09-12 12:17 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-09-12 12:49 ` [Intel-xe] ✓ CI.BAT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230912115239.3554341-1-tejas.upadhyay@intel.com \
    --to=tejas.upadhyay@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox