Skip to content

Proper GT TLB invalidation layering and new coalescing feature.

Matthew Brost intel-xe 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest11 patches 12 repliesIn review
  2. v111 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Fix CI issues
- Clean up some of the series / patch structure

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11drm/xe: Add xe_gt_tlb_invalidation_fence_init helperdrivers/gpu/drm/xe/xe_gt_tlb_invalidation.c drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h drivers/gpu/drm/xe/xe_pt.c+40 -251 reply
2/11drm/xe: Drop xe_gt_tlb_invalidation_waitdrivers/gpu/drm/xe/xe_gt_tlb_invalidation.c drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h drivers/gpu/drm/xe/xe_vm.c+49 -871 reply
3/11drm/xe: s/tlb_invalidation.lock/tlb_invalidation.fence_lockdrivers/gpu/drm/xe/xe_gt_tlb_invalidation.c drivers/gpu/drm/xe/xe_gt_types.h+6 -61 reply
4/11drm/xe: Add tlb_invalidation.seqno_lockdrivers/gpu/drm/xe/xe_gt_tlb_invalidation.c drivers/gpu/drm/xe/xe_gt_types.h+71 -500 replies
5/11drm/xe: Add xe_gt_tlb_invalidation_done_handlerdrivers/gpu/drm/xe/xe_gt_tlb_invalidation.c+30 -171 reply
6/11drm/xe: Add send tlb invalidation helpersdrivers/gpu/drm/xe/xe_gt_tlb_invalidation.c+84 -820 replies
7/11drm/xe: Add xe_guc_tlb_invalidation layerdrivers/gpu/drm/xe/Makefile drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h +5 more+186 -1182 replies
8/11drm/xe: Add multi-client support for GT TLB invalidationsdrivers/gpu/drm/xe/xe_gt_tlb_invalidation.c drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h drivers/gpu/drm/xe/xe_gt_tlb_invalidation_types.h +2 more+82 -220 replies
9/11drm/xe: Add GT TLB invalidation coalescingdrivers/gpu/drm/xe/xe_ggtt.c drivers/gpu/drm/xe/xe_ggtt_types.h drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c +6 more+349 -280 replies
10/11drm/xe: Add GT TLB invalidation coalesce tracepointsdrivers/gpu/drm/xe/xe_gt_tlb_invalidation.c drivers/gpu/drm/xe/xe_trace.h+14 -10 replies
11/11drm/xe: Add GT TLB invalidation watermark debugfsdrivers/gpu/drm/xe/xe_debugfs.c drivers/gpu/drm/xe/xe_device.c drivers/gpu/drm/xe/xe_device_types.h +1 more+51 -40 replies

Reviews trailers per patch

4 of 11 patches have a Reviewed-by or Acked-by.

PatchNirmoy DasStuart Summers
1/11R-b
2/11R-b
3/11R-b
4/11
5/11R-b
6/11
7/11
8/11
9/11
10/11
11/11

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

Read the v2 thread

Cover letter [PATCH v2 00/11] Proper GT TLB invalidation layering and new coalescing feature.

While debuging [1] an issue was identified in which if too many GT TLB invalidations are issued to the GuC, the GuC can get overwhelmed to the point scheduling of jobs starts to stall. To avoid this, hold and coalesce GT TLB invalidations in the KMD if a watermark of pending invalidations is past. Add gitlab for this issue has also been opened [2].

Layering issues with GT TLB invalidations are known [3] which needed to be fixed first before adding this new feature.

- Patches 1-8 fix the layering.
- Patches 9-11 add coalescing feature.

We could merge these two as seperate series if needed.

CCing various stakeholders (Farah, Michal, Nirmoy) which have raised GT TLB invalidation issues in the past.

v2:
- Fix CI issues
- Clean up some of the series / patch structure

Matt

[1] https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/799#note_2449497
[2] https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2162
[3] https://patchwork.freedesktop.org/series/133001/

Matthew Brost (11):
drm/xe: Add xe_gt_tlb_invalidation_fence_init helper drm/xe: Drop xe_gt_tlb_invalidation_wait
drm/xe: s/tlb_invalidation.lock/tlb_invalidation.fence_lock drm/xe: Add tlb_invalidation.seqno_lock
drm/xe: Add xe_gt_tlb_invalidation_done_handler drm/xe: Add send tlb invalidation helpers
drm/xe: Add xe_guc_tlb_invalidation layer
drm/xe: Add multi-client support for GT TLB invalidations drm/xe: Add GT TLB invalidation coalescing drm/xe: Add GT TLB invalidation coalesce tracepoints drm/xe: Add GT TLB invalidation watermark debugfs

 drivers/gpu/drm/xe/Makefile                   |   1 +
 drivers/gpu/drm/xe/xe_debugfs.c               |  38 ++
 drivers/gpu/drm/xe/xe_device.c                |   3 +
 drivers/gpu/drm/xe/xe_device_types.h          |   5 +
 drivers/gpu/drm/xe/xe_ggtt.c                  |  21 +-
 drivers/gpu/drm/xe/xe_ggtt_types.h            |   5 +
 drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c   | 641 ++++++++++++------
 drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h   |  26 +-
 .../gpu/drm/xe/xe_gt_tlb_invalidation_types.h |  41 ++
 drivers/gpu/drm/xe/xe_gt_types.h              |  43 +-
 drivers/gpu/drm/xe/xe_guc_ct.c                |   2 +-
 drivers/gpu/drm/xe/xe_guc_tlb_invalidation.c  | 145 ++++
 drivers/gpu/drm/xe/xe_guc_tlb_invalidation.h  |  18 +
 drivers/gpu/drm/xe/xe_pt.c                    |  33 +-
 drivers/gpu/drm/xe/xe_trace.h                 |  10 +
 drivers/gpu/drm/xe/xe_vm.c                    |  45 +-
 drivers/gpu/drm/xe/xe_vm_types.h              |   3 +
 17 files changed, 801 insertions(+), 279 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/xe_guc_tlb_invalidation.c
 create mode 100644 drivers/gpu/drm/xe/xe_guc_tlb_invalidation.h
Signature · 1 line
2.34.1