From: Oak Zeng <oak.zeng@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: thomas.hellstrom@intel.com, matthew.brost@intel.com,
brian.welty@intel.com, himal.prasad.ghimiray@intel.com,
lucas.demarchi@intel.com
Subject: [PATCH 0/4] Change userptr so it can be unified with hmmptr
Date: Wed, 20 Mar 2024 22:29:35 -0400 [thread overview]
Message-ID: <20240321022939.2279979-1-oak.zeng@intel.com> (raw)
This is an effort to modify userptr code so it can be unified with
hmmptr.
A helper xe_userptr_populate_range is created to populate a user
page using hmm_range_fault, instead of using get_user_pages_fast.
This helper is then used to replace some userptr codes.
The same help will be used later for hmmptr.
The userptr invalidation code is also changed to match the hmmptr
behavior. We now destroy vma when userptr is munmapped from CPU.
This is part of the hmmptr (system allocator) codes. Since this
part can be merged separately, send it out for CI and review first.
It will be followed by other hmmptr codes.
Oak Zeng (4):
drm/xe: Introduce helper to populate userptr
drm/xe: Introduce a helper to free sg table
drm/xe: Use hmm_range_fault to populate user pages
drm/xe: destroy userptr vma on UNMAP event
drivers/gpu/drm/xe/Kconfig | 1 +
drivers/gpu/drm/xe/Makefile | 2 +
drivers/gpu/drm/xe/xe_hmm.c | 254 ++++++++++++++++++++++++++++++++++++
drivers/gpu/drm/xe/xe_hmm.h | 18 +++
drivers/gpu/drm/xe/xe_vm.c | 130 +++---------------
5 files changed, 294 insertions(+), 111 deletions(-)
create mode 100644 drivers/gpu/drm/xe/xe_hmm.c
create mode 100644 drivers/gpu/drm/xe/xe_hmm.h
--
2.26.3
next reply other threads:[~2024-03-21 2:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 2:29 Oak Zeng [this message]
2024-03-21 2:27 ` ✓ CI.Patch_applied: success for Change userptr so it can be unified with hmmptr Patchwork
2024-03-21 2:27 ` ✗ CI.checkpatch: warning " Patchwork
2024-03-21 2:28 ` ✓ CI.KUnit: success " Patchwork
2024-03-21 2:29 ` [PATCH 1/4] drm/xe: Introduce helper to populate userptr Oak Zeng
2024-03-21 2:29 ` [PATCH 2/4] drm/xe: Introduce a helper to free sg table Oak Zeng
2024-03-21 2:29 ` [PATCH 3/4] drm/xe: Use hmm_range_fault to populate user pages Oak Zeng
2024-03-21 2:29 ` [PATCH 4/4] drm/xe: destroy userptr vma on UNMAP event Oak Zeng
2024-03-21 3:21 ` Matthew Brost
2024-03-21 14:56 ` Zeng, Oak
2024-03-21 17:01 ` Matthew Brost
2024-03-21 20:00 ` Zeng, Oak
2024-03-21 14:30 ` Hellstrom, Thomas
2024-03-21 17:31 ` Zeng, Oak
2024-03-21 2:39 ` ✓ CI.Build: success for Change userptr so it can be unified with hmmptr Patchwork
2024-03-21 2:43 ` ✓ CI.Hooks: " Patchwork
2024-03-21 2:44 ` ✓ CI.checksparse: " Patchwork
2024-03-21 3:12 ` ✗ CI.BAT: failure " 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=20240321022939.2279979-1-oak.zeng@intel.com \
--to=oak.zeng@intel.com \
--cc=brian.welty@intel.com \
--cc=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=matthew.brost@intel.com \
--cc=thomas.hellstrom@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