Skip to content

drm/xe: fdinfo memory stats

Tejas Upadhyay intel-xe 5 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest7 patches 0 repliesNew
  2. v47 patches 1 replySuperseded
  3. v37 patches 2 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v27 patches3 repliesSuperseded
v17 patches18 repliesSuperseded

Changes in v5 from the cover letter

- Rebase on top

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7drm/xe: Add drm-client infrastructuredrivers/gpu/drm/xe/Makefile drivers/gpu/drm/xe/xe_device.c drivers/gpu/drm/xe/xe_device_types.h +2 more+116 -10 replies
2/7drm/xe: Interface xe drm client with fdinfo interfacedrivers/gpu/drm/xe/xe_device.c drivers/gpu/drm/xe/xe_drm_client.c drivers/gpu/drm/xe/xe_drm_client.h+26 -10 replies
3/7drm/xe: Add tracking support for bos per clientdrivers/gpu/drm/xe/xe_bo.c drivers/gpu/drm/xe/xe_bo_types.h drivers/gpu/drm/xe/xe_drm_client.c +1 more+92 -00 replies
4/7drm/xe: Record each drm client with its VMdrivers/gpu/drm/xe/xe_vm.c drivers/gpu/drm/xe/xe_vm_types.h+3 -00 replies
5/7drm/xe: Track page table memory usage for clientdrivers/gpu/drm/xe/xe_pt.c drivers/gpu/drm/xe/xe_vm.c+10 -00 replies
6/7drm/xe: Account ring buffer and context state storagedrivers/gpu/drm/xe/xe_lrc.c+6 -10 replies
7/7drm/xe: Implement fdinfo memory stats printingdrivers/gpu/drm/xe/xe_bo.h drivers/gpu/drm/xe/xe_drm_client.c+99 -10 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchHimal Prasad Ghimiray
1/7R-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [Intel-xe] [PATCH V5 0/7] drm/xe: fdinfo memory stats

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

V5 :
- Rebase on top

Testcase: https://patchwork.freedesktop.org/series/123264/#rev4

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           |   9 ++
 drivers/gpu/drm/xe/xe_bo.h           |  11 ++
 drivers/gpu/drm/xe/xe_bo_types.h     |  10 ++
 drivers/gpu/drm/xe/xe_device.c       |  21 ++-
 drivers/gpu/drm/xe/xe_device_types.h |   6 +
 drivers/gpu/drm/xe/xe_drm_client.c   | 204 +++++++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_drm_client.h   |  70 +++++++++
 drivers/gpu/drm/xe/xe_lrc.c          |   7 +-
 drivers/gpu/drm/xe/xe_pt.c           |   3 +
 drivers/gpu/drm/xe/xe_vm.c           |   8 ++
 drivers/gpu/drm/xe/xe_vm_types.h     |   2 +
 12 files changed, 350 insertions(+), 2 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/xe_drm_client.c
 create mode 100644 drivers/gpu/drm/xe/xe_drm_client.h
Signature · 1 line
2.25.1