Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: farah.kassabri@intel.com, michal.wajdeczko@intel.com
Subject: [PATCH 00/11] Proper GT TLB invalidation layering and new coalescing feature.
Date: Fri,  5 Jul 2024 17:02:41 -0700	[thread overview]
Message-ID: <20240706000252.702044-1-matthew.brost@intel.com> (raw)

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 invalidations in the past.

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 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   | 637 ++++++++++++------
 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  | 151 +++++
 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, 800 insertions(+), 282 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

-- 
2.34.1


             reply	other threads:[~2024-07-06  0:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-06  0:02 Matthew Brost [this message]
2024-07-06  0:02 ` [PATCH 01/11] drm/xe: Add xe_gt_tlb_invalidation_fence_init helper Matthew Brost
2024-07-06  0:02 ` [PATCH 02/11] drm/xe: Drop xe_gt_tlb_invalidation_wait Matthew Brost
2024-07-06  0:02 ` [PATCH 03/11] drm/xe: s/tlb_invalidation.lock/tlb_invalidation.fence_lock Matthew Brost
2024-07-06  0:02 ` [PATCH 04/11] drm/xe: Add tlb_invalidation.seqno_lock Matthew Brost
2024-07-06  0:02 ` [PATCH 05/11] drm/xe: Add xe_gt_tlb_invalidation_done_handler Matthew Brost
2024-07-06  0:02 ` [PATCH 06/11] drm/xe: Add send tlb invalidation helpers Matthew Brost
2024-07-06  0:02 ` [PATCH 07/11] drm/xe: Add xe_guc_tlb_invalidation layer Matthew Brost
2024-07-06  0:02 ` [PATCH 08/11] drm/xe: Add multi-client support for GT TLB invalidations Matthew Brost
2024-07-06  0:02 ` [PATCH 09/11] drm/xe: Add GT TLB invalidation coalescing Matthew Brost
2024-07-06  0:02 ` [PATCH 10/11] drm/xe: Add GT TLB coalesce tracepoints Matthew Brost
2024-07-06  0:02 ` [PATCH 11/11] drm/xe: Add GT TLB invalidation watermark debugfs Matthew Brost
2024-07-06  0:07 ` ✓ CI.Patch_applied: success for Proper GT TLB invalidation layering and new coalescing feature Patchwork
2024-07-06  0:07 ` ✗ CI.checkpatch: warning " Patchwork
2024-07-06  0:08 ` ✓ CI.KUnit: success " Patchwork
2024-07-06  0:20 ` ✓ CI.Build: " Patchwork
2024-07-06  0:22 ` ✗ CI.Hooks: failure " Patchwork
2024-07-06  0:24 ` ✓ CI.checksparse: success " Patchwork
2024-07-06  0:53 ` ✗ CI.BAT: failure " Patchwork
2024-07-06  1:41 ` ✗ CI.FULL: " 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=20240706000252.702044-1-matthew.brost@intel.com \
    --to=matthew.brost@intel.com \
    --cc=farah.kassabri@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=michal.wajdeczko@intel.com \
    /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