From: Felix Kuehling <felix.kuehling@amd.com>
To: Lang Yu <Lang.Yu@amd.com>, amd-gfx@lists.freedesktop.org
Cc: Philip Yang <Philip.Yang@amd.com>
Subject: Re: [PATCH] drm/amdkfd: disable SVM for GC 10.1.3/4
Date: Thu, 7 Sep 2023 16:03:19 -0400 [thread overview]
Message-ID: <670c67e3-1ce4-e57d-3ff5-5b314cc61ab0@amd.com> (raw)
In-Reply-To: <20230907120848.3169535-1-Lang.Yu@amd.com>
We need heavy-weight flushes not just for SVM. If this is broken it will
affect ROCm either way.
Regards,
Felix
On 2023-09-07 08:08, Lang Yu wrote:
> GC 10.1.3/4 have problems with TLB_FLUSH_HEAVYWEIGHT
> which is used by SVM in svm_range_unmap_from_gpus().
> This causes problems on GC 10.1.3/4.
>
> Signed-off-by: Lang Yu <Lang.Yu@amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 22 +++++++++++++++++-----
> 1 file changed, 17 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
> index 7d82c7da223a..dd3db3d88d59 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
> @@ -992,6 +992,22 @@ static const struct dev_pagemap_ops svm_migrate_pgmap_ops = {
> /* Each VRAM page uses sizeof(struct page) on system memory */
> #define SVM_HMM_PAGE_STRUCT_SIZE(size) ((size)/PAGE_SIZE * sizeof(struct page))
>
> +static inline bool is_zone_device_needed(struct amdgpu_device *adev)
> +{
> + /* Page migration works on gfx9 or newer */
> + if (adev->ip_versions[GC_HWIP][0] < IP_VERSION(9, 0, 1))
> + return false;
> +
> + if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 1, 3) ||
> + adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 1, 4))
> + return false;
> +
> + if (adev->gmc.is_app_apu)
> + return false;
> +
> + return true;
> +}
> +
> int kgd2kfd_init_zone_device(struct amdgpu_device *adev)
> {
> struct amdgpu_kfd_dev *kfddev = &adev->kfd;
> @@ -1000,11 +1016,7 @@ int kgd2kfd_init_zone_device(struct amdgpu_device *adev)
> unsigned long size;
> void *r;
>
> - /* Page migration works on gfx9 or newer */
> - if (adev->ip_versions[GC_HWIP][0] < IP_VERSION(9, 0, 1))
> - return -EINVAL;
> -
> - if (adev->gmc.is_app_apu)
> + if (!is_zone_device_needed(adev))
> return 0;
>
> pgmap = &kfddev->pgmap;
next prev parent reply other threads:[~2023-09-07 20:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-07 12:08 [PATCH] drm/amdkfd: disable SVM for GC 10.1.3/4 Lang Yu
2023-09-07 20:03 ` Felix Kuehling [this message]
2023-09-08 2:27 ` Lang Yu
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=670c67e3-1ce4-e57d-3ff5-5b314cc61ab0@amd.com \
--to=felix.kuehling@amd.com \
--cc=Lang.Yu@amd.com \
--cc=Philip.Yang@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/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