From: "Christian König" <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Zeng, Oak" <Oak.Zeng-5C7GfCeVMHo@public.gmane.org>,
"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH 3/3] drm/amdgpu: stop evicting busy PDs/PTs
Date: Mon, 11 Mar 2019 17:56:44 +0100 [thread overview]
Message-ID: <9d859fdb-2f1d-4c33-0fd5-68dba6aa5f98@gmail.com> (raw)
In-Reply-To: <SN1PR12MB2591DF43E612DA4561EE1271804D0-z7L1TMIYDg4kcGSeFLWKcQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
No, that would create a nice deny of service.
An application could map the same tiny bit of memory all over the
address space and so force the system to run out of memory.
Christian.
Am 08.03.19 um 21:46 schrieb Zeng, Oak:
> Should we even consider not evicting all PDs/PTs, busy or not. See PDs/PTs only use a tiny bit (roughly ~0.05%) of the total memory. You really don't get much memory when you evict them. But I doubt the evict/restore performance penalty is big.
>
> Thanks,
> Oak
>
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Christian König
> Sent: Friday, March 8, 2019 9:32 AM
> To: amd-gfx@lists.freedesktop.org
> Subject: [PATCH 3/3] drm/amdgpu: stop evicting busy PDs/PTs
>
> Otherwise we won't be able to cleanly handle page faults.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index cd0ccfbbcb84..c1240bf243ba 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -1371,6 +1371,13 @@ static bool amdgpu_ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
> struct dma_fence *f;
> int i;
>
> + /* Don't evict VM page tables while they are busy, otherwise we can't
> + * cleanly handle page faults.
> + */
> + if (bo->type == ttm_bo_type_kernel &&
> + !reservation_object_test_signaled_rcu(bo->resv, true))
> + return false;
> +
> /* If bo is a KFD BO, check if the bo belongs to the current process.
> * If true, then return false as any KFD process needs all its BOs to
> * be resident to run successfully
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2019-03-11 16:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-08 14:31 [PATCH 1/3] drm/amdgpu: remove non-sense NULL ptr check Christian König
[not found] ` <20190308143147.23341-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2019-03-08 14:31 ` [PATCH 2/3] drm/amdgpu: wait for VM to become idle during flush Christian König
2019-03-08 14:31 ` [PATCH 3/3] drm/amdgpu: stop evicting busy PDs/PTs Christian König
[not found] ` <20190308143147.23341-3-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2019-03-08 20:46 ` Zeng, Oak
[not found] ` <SN1PR12MB2591DF43E612DA4561EE1271804D0-z7L1TMIYDg4kcGSeFLWKcQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-03-11 16:56 ` Christian König [this message]
2019-03-12 12:33 ` [PATCH 1/3] drm/amdgpu: remove non-sense NULL ptr check Christian König
2019-03-12 13:27 ` Chunming Zhou
-- strict thread matches above, loose matches on Subject: below --
2019-02-26 13:05 Christian König
[not found] ` <20190226130543.1883-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2019-02-26 13:05 ` [PATCH 3/3] drm/amdgpu: stop evicting busy PDs/PTs Christian König
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=9d859fdb-2f1d-4c33-0fd5-68dba6aa5f98@gmail.com \
--to=ckoenig.leichtzumerken-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=Oak.Zeng-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=christian.koenig-5C7GfCeVMHo@public.gmane.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