<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    Exactly that, yes. The idea is that we want to create at least some
    pressure on VRAM when VRAM|GTT is specified.<br>
    <br>
    Essentially we would like to have that for CS as well, but it's just
    hard to find the right balance between no pressure and the full
    pressure of VRAM placement for VRAM|GTT BOs.<br>
    <br>
    It's on my todo list to tackle that and I'm currently working on an
    userspace tool to better simulate those setups, but it's just a side
    project.<br>
    <br>
    Christian.<br>
    <br>
    <div class="moz-cite-prefix">Am 17.09.21 um 09:35 schrieb Pan,
      Xinhui:<br>
    </div>
    <blockquote type="cite" cite="mid:DM4PR12MB5165DDADEE756AA4B3BAD54987DD9@DM4PR12MB5165.namprd12.prod.outlook.com">
      
      <p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:5pt;" align="Left">
        [AMD Official Use Only]<br>
      </p>
      <br>
      <div>
        <div dir="auto" style="direction: ltr; margin: 0px; padding:
          0px; font-family: sans-serif; font-size: 11pt; color: black;
          text-align: left;">
          Why? just to evict some inactive vram BOs?</div>
        <hr style="display:inline-block;width:98%" tabindex="-1">
        <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b>
            Koenig, Christian <a class="moz-txt-link-rfc2396E" href="mailto:Christian.Koenig@amd.com"><Christian.Koenig@amd.com></a><br>
            <b>Sent:</b> Friday, September 17, 2021 3:06:16 PM<br>
            <b>To:</b> Pan, Xinhui <a class="moz-txt-link-rfc2396E" href="mailto:Xinhui.Pan@amd.com"><Xinhui.Pan@amd.com></a>;
            <a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a>
            <a class="moz-txt-link-rfc2396E" href="mailto:amd-gfx@lists.freedesktop.org"><amd-gfx@lists.freedesktop.org></a><br>
            <b>Cc:</b> Deucher, Alexander
            <a class="moz-txt-link-rfc2396E" href="mailto:Alexander.Deucher@amd.com"><Alexander.Deucher@amd.com></a><br>
            <b>Subject:</b> Re: [PATCH] drm/amdgpu: Let BO created in
            its allowed_domain</font>
          <div> </div>
        </div>
        <div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
              <div class="PlainText">Am 17.09.21 um 09:04 schrieb xinhui
                pan:<br>
                > For any user BO, it is allowed to alloc memory in
                both GTT and VRAM<br>
                > domain. That means one VRAM BO could be eviced to
                GTT.<br>
                ><br>
                > Now if device is already lack of VRAM, this BO
                could alloc memory from<br>
                > GTT directly without evicting other VRAM BO. In
                this way we can reduce<br>
                > memory evictions.<br>
                <br>
                NAK, that is intentional pressure on VRAM during
                allocation of new memory.<br>
                <br>
                Christian.<br>
                <br>
                ><br>
                > Signed-off-by: xinhui pan
                <a class="moz-txt-link-rfc2396E" href="mailto:xinhui.pan@amd.com"><xinhui.pan@amd.com></a><br>
                > ---<br>
                >   drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-<br>
                >   1 file changed, 1 insertion(+), 1 deletion(-)<br>
                ><br>
                > diff --git
                a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
                b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c<br>
                > index 66bb8a53bb20..9a547bb38cda 100644<br>
                > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c<br>
                > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c<br>
                > @@ -579,7 +579,7 @@ int amdgpu_bo_create(struct
                amdgpu_device *adev,<br>
                >                          AMDGPU_GEM_DOMAIN_GDS))<br>
                >                amdgpu_bo_placement_from_domain(bo,
                AMDGPU_GEM_DOMAIN_CPU);<br>
                >        else<br>
                > -             amdgpu_bo_placement_from_domain(bo,
                bp->domain);<br>
                > +             amdgpu_bo_placement_from_domain(bo,
                bo->allowed_domains);<br>
                >        if (bp->type == ttm_bo_type_kernel)<br>
                >                bo->tbo.priority = 1;<br>
                >   <br>
                <br>
              </div>
            </span></font></div>
      </div>
    </blockquote>
    <br>
  </body>
</html>