From: apoorva.singh@intel.com
To: intel-xe@lists.freedesktop.org
Cc: oak.zeng@intel.com, Apoorva Singh <apoorva.singh@intel.com>,
Brian Welty <brian.welty@intel.com>
Subject: [PATCH 0/2] drm/xe/uapi: Restore uapi for access counting
Date: Tue, 1 Oct 2024 19:24:30 +0530 [thread overview]
Message-ID: <20241001135432.447074-1-apoorva.singh@intel.com> (raw)
From: Apoorva Singh <apoorva.singh@intel.com>
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().
Cc: Oak Zeng <oak.zeng@intel.com>
Signed-off-by: Brian Welty <brian.welty@intel.com>
Signed-off-by: Apoorva Singh <apoorva.singh@intel.com>
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(-)
--
2.34.1
next reply other threads:[~2024-10-01 13:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-01 13:54 apoorva.singh [this message]
2024-10-01 13:50 ` ✓ CI.Patch_applied: success for drm/xe/uapi: Restore uapi for access counting Patchwork
2024-10-01 13:50 ` ✓ CI.checkpatch: " Patchwork
2024-10-01 13:51 ` ✓ CI.KUnit: " Patchwork
2024-10-01 13:54 ` [PATCH 1/2] drm/xe: Add support for PTE_NC bit apoorva.singh
2024-10-01 16:26 ` Cavitt, Jonathan
2024-10-01 13:54 ` [PATCH 2/2] drm/xe/uapi: Restore uapi for access counting apoorva.singh
2024-10-01 16:35 ` Cavitt, Jonathan
2024-10-01 21:02 ` Lucas De Marchi
2024-10-02 15:03 ` Matthew Brost
2024-10-02 17:42 ` Lucas De Marchi
2024-10-03 5:15 ` Dandamudi, Priyanka
2024-10-01 14:02 ` ✓ CI.Build: success for " Patchwork
2024-10-01 14:05 ` ✗ CI.Hooks: failure " Patchwork
2024-10-01 14:06 ` ✓ CI.checksparse: success " Patchwork
2024-10-01 14:25 ` ✗ CI.BAT: failure " Patchwork
2024-10-01 22:06 ` ✗ 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=20241001135432.447074-1-apoorva.singh@intel.com \
--to=apoorva.singh@intel.com \
--cc=brian.welty@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=oak.zeng@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