All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pan, Xinhui" <Xinhui.Pan@amd.com>
To: "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"Koenig,  Christian" <Christian.Koenig@amd.com>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>
Subject: Re: [PATCH] drm/amdgpu: Let BO created in its allowed_domain
Date: Fri, 17 Sep 2021 07:35:12 +0000	[thread overview]
Message-ID: <DM4PR12MB5165DDADEE756AA4B3BAD54987DD9@DM4PR12MB5165.namprd12.prod.outlook.com> (raw)
In-Reply-To: <59a231be-f623-196e-e547-8d5c75d0f314@amd.com>

[-- Attachment #1: Type: text/plain, Size: 1734 bytes --]

[AMD Official Use Only]

Why? just to evict some inactive vram BOs?
________________________________
From: Koenig, Christian <Christian.Koenig@amd.com>
Sent: Friday, September 17, 2021 3:06:16 PM
To: Pan, Xinhui <Xinhui.Pan@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: Re: [PATCH] drm/amdgpu: Let BO created in its allowed_domain

Am 17.09.21 um 09:04 schrieb xinhui pan:
> For any user BO, it is allowed to alloc memory in both GTT and VRAM
> domain. That means one VRAM BO could be eviced to GTT.
>
> Now if device is already lack of VRAM, this BO could alloc memory from
> GTT directly without evicting other VRAM BO. In this way we can reduce
> memory evictions.

NAK, that is intentional pressure on VRAM during allocation of new memory.

Christian.

>
> Signed-off-by: xinhui pan <xinhui.pan@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index 66bb8a53bb20..9a547bb38cda 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -579,7 +579,7 @@ int amdgpu_bo_create(struct amdgpu_device *adev,
>                          AMDGPU_GEM_DOMAIN_GDS))
>                amdgpu_bo_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_CPU);
>        else
> -             amdgpu_bo_placement_from_domain(bo, bp->domain);
> +             amdgpu_bo_placement_from_domain(bo, bo->allowed_domains);
>        if (bp->type == ttm_bo_type_kernel)
>                bo->tbo.priority = 1;
>


[-- Attachment #2: Type: text/html, Size: 3203 bytes --]

  reply	other threads:[~2021-09-17  7:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17  7:04 [PATCH] drm/amdgpu: Let BO created in its allowed_domain xinhui pan
2021-09-17  7:06 ` Christian König
2021-09-17  7:35   ` Pan, Xinhui [this message]
2021-09-17  7:42     ` 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=DM4PR12MB5165DDADEE756AA4B3BAD54987DD9@DM4PR12MB5165.namprd12.prod.outlook.com \
    --to=xinhui.pan@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Christian.Koenig@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.