Skip to content

drm/xe/uapi: Restore uapi for access counting

[email protected] intel-xe 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/xe: Add support for PTE_NC bitdrivers/gpu/drm/xe/xe_bo.c drivers/gpu/drm/xe/xe_bo.h drivers/gpu/drm/xe/xe_pt.c+41 -01 reply
2/2drm/xe/uapi: Restore uapi for access countingdrivers/gpu/drm/xe/xe_exec_queue.c drivers/gpu/drm/xe/xe_exec_queue_types.h drivers/gpu/drm/xe/xe_execlist.c +3 more+79 -85 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchJonathan Cavitt
1/2
2/2R-b

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

Read the v1 thread

Cover letter [PATCH 0/2] drm/xe/uapi: Restore uapi for access counting

From: Apoorva Singh <[email protected]>

In order to enable access counters, this must be enabled in LRC for the exec_queue. Add basic uAPI to set configuration of access counter trigger threshold and granularity.

When access counters are enabled and threshold is hit, the access counter handler in xe_gt_pagefault.c will migrate the buffer to that to that GT's local VRAM.

The current implementation of access counters is incomplete in that it doesn't manage the PTE_NC (No Count) bit. HW has finite number of access counters which HW itself dynamically allocates/deallocates. As these are a finite resource, don't enable access counting (don't waste counters) for page table mappings which cannot take any action on trigger of access counter threshold (cannot be migrated).
The logic for this decision is encapsulated in xe_bo_can_use_acc().

Brian Welty (2):
drm/xe: Add support for PTE_NC bit
drm/xe/uapi: Restore uapi for access counting

 drivers/gpu/drm/xe/xe_bo.c               | 34 ++++++++++++++++++
 drivers/gpu/drm/xe/xe_bo.h               |  3 ++
 drivers/gpu/drm/xe/xe_exec_queue.c       | 46 ++++++++++++++++++++++--
 drivers/gpu/drm/xe/xe_exec_queue_types.h | 10 ++++++
 drivers/gpu/drm/xe/xe_execlist.c         |  2 +-
 drivers/gpu/drm/xe/xe_lrc.c              | 16 ++++++---
 drivers/gpu/drm/xe/xe_lrc.h              |  2 +-
 drivers/gpu/drm/xe/xe_pt.c               |  4 +++
 include/uapi/drm/xe_drm.h                | 11 ++++++
 9 files changed, 120 insertions(+), 8 deletions(-)
Signature · 1 line
2.34.1