From: "Ghimiray, Himal Prasad" <himal.prasad.ghimiray@intel.com>
To: Oak Zeng <oak.zeng@intel.com>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v10 0/3] Allow scratch page under fault mode for certain platform
Date: Mon, 7 Apr 2025 11:07:42 +0530 [thread overview]
Message-ID: <c1c6d8aa-31e0-4bd0-aaaa-cadbe58b14d0@intel.com> (raw)
In-Reply-To: <20250403165328.2438690-1-oak.zeng@intel.com>
On 03-04-2025 22:23, Oak Zeng wrote:
> Normally scratch page is not allowed when a vm is operate under page
> fault mode, i.e., in the existing codes, DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE
> and DRM_XE_VM_CREATE_FLAG_FAULT_MODE are mutual exclusive. The reason
> is fault mode relies on recoverable page to work, while scratch page
> can mute recoverable page fault.
>
> On xe2 and xe3, out of bound prefetch can cause page fault and further
> system hang because xekmd can't resolve such page fault. SYCL and OCL
> language runtime requires out of bound prefetch to be silently dropped
> without causing any functional problem, thus the existing behavior
> doesn't meet language runtime requirement.
>
> At the same time, HW prefetching can cause page fault interrupt. Due to
> page fault interrupt overhead (i.e., need Guc and KMD involved to fix
> the page fault), HW prefetching can be slowed by many orders of magnitude.
>
> Fix those problems by allowing scratch page under fault mode for xe2 and
> xe3. With scratch page in place, HW prefetching could always hit scratch
> page instead of causing interrupt.
>
> A side effect is, scratch page could hide application program error.
> Application out of bound accesses are hided by scratch page mapping,
> instead of get reported to user.
>
> igt test: https://patchwork.freedesktop.org/series/144907/, Test result on
> BMG:
pushed to drm-xe-next.
Thanks for the patches and Reviews.>
> root@DUT1130BMGFRD:/home/szeng/dii-tools/igt-public/build/tests# ./xe_exec_fault_mode --run-subtest scratch-fault
> IGT-Version: 1.30-gde1a3cb42 (x86_64) (Linux: 6.13.0-xe x86_64)
> Using IGT_SRANDOM=1738684805 for randomisation
> Opened device: /dev/dri/card0
> Starting subtest: scratch-fault
> Subtest scratch-fault: SUCCESS (0.080s)
>
> Oak Zeng (3):
> drm/xe: Introduced needs_scratch bit in device descriptor
> drm/xe: Clear scratch page on vm_bind
> drm/xe: Allow scratch page under fault mode for certain platform
>
> drivers/gpu/drm/xe/xe_device_types.h | 2 +
> drivers/gpu/drm/xe/xe_pci.c | 5 ++
> drivers/gpu/drm/xe/xe_pt.c | 99 ++++++++++++++++++----------
> drivers/gpu/drm/xe/xe_vm.c | 31 +++++++--
> drivers/gpu/drm/xe/xe_vm_types.h | 2 +
> include/uapi/drm/xe_drm.h | 6 +-
> 6 files changed, 102 insertions(+), 43 deletions(-)
>
prev parent reply other threads:[~2025-04-07 5:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-03 16:53 [PATCH v10 0/3] Allow scratch page under fault mode for certain platform Oak Zeng
2025-04-03 16:53 ` [PATCH v10 1/3] drm/xe: Introduced needs_scratch bit in device descriptor Oak Zeng
2025-04-07 5:29 ` Ghimiray, Himal Prasad
2025-04-03 16:53 ` [PATCH v10 2/3] drm/xe: Clear scratch page on vm_bind Oak Zeng
2025-04-07 5:31 ` Ghimiray, Himal Prasad
2025-04-03 16:53 ` [PATCH v10 3/3] drm/xe: Allow scratch page under fault mode for certain platform Oak Zeng
2025-04-07 5:31 ` Ghimiray, Himal Prasad
2025-04-03 20:34 ` ✓ CI.Patch_applied: success for " Patchwork
2025-04-03 20:34 ` ✗ CI.checkpatch: warning " Patchwork
2025-04-03 20:35 ` ✓ CI.KUnit: success " Patchwork
2025-04-03 20:52 ` ✓ CI.Build: " Patchwork
2025-04-03 20:54 ` ✗ CI.Hooks: failure " Patchwork
2025-04-03 20:56 ` ✓ CI.checksparse: success " Patchwork
2025-04-03 21:46 ` ✓ Xe.CI.BAT: " Patchwork
2025-04-07 5:37 ` Ghimiray, Himal Prasad [this message]
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=c1c6d8aa-31e0-4bd0-aaaa-cadbe58b14d0@intel.com \
--to=himal.prasad.ghimiray@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