public inbox for amd-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Zhang, Jerry (Junwei)" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: "Christian König"
	<ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: michel.daenzer-5C7GfCeVMHo@public.gmane.org
Subject: Re: [PATCH 2/3] drm/amdgpu: fix "use bulk moves for efficient VM LRU handling" v2
Date: Mon, 3 Sep 2018 10:05:50 +0800	[thread overview]
Message-ID: <5B8C96FE.4070805@amd.com> (raw)
In-Reply-To: <20180831131019.2486-2-christian.koenig-5C7GfCeVMHo@public.gmane.org>

On 08/31/2018 09:10 PM, Christian König wrote:
> First step to fix the LRU corruption, we accidentially tried to move things
> on the LRU after dropping the lock.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> index dd734970e167..349dcc37ee64 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> @@ -1237,6 +1237,8 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
>   	ring = to_amdgpu_ring(entity->rq->sched);
>   	amdgpu_ring_priority_get(ring, priority);
>
> +	amdgpu_vm_move_to_lru_tail(p->adev, &fpriv->vm);
> +
>   	ttm_eu_fence_buffer_objects(&p->ticket, &p->validated, p->fence);
>   	amdgpu_mn_unlock(p->mn);
>
> @@ -1258,7 +1260,6 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
>   	union drm_amdgpu_cs *cs = data;
>   	struct amdgpu_cs_parser parser = {};
>   	bool reserved_buffers = false;
> -	struct amdgpu_fpriv *fpriv;
>   	int i, r;
>
>   	if (!adev->accel_working)
> @@ -1303,8 +1304,6 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
>
>   	r = amdgpu_cs_submit(&parser, cs);
>
> -	fpriv = filp->driver_priv;
> -	amdgpu_vm_move_to_lru_tail(adev, &fpriv->vm);
>   out:
>   	amdgpu_cs_parser_fini(&parser, r, reserved_buffers);
>   	return r;
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-09-03  2:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31 13:10 [PATCH 1/3] drm/ttm: fix ttm_bo_bulk_move_helper Christian König
     [not found] ` <20180831131019.2486-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-08-31 13:10   ` [PATCH 2/3] drm/amdgpu: fix "use bulk moves for efficient VM LRU handling" v2 Christian König
     [not found]     ` <20180831131019.2486-2-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-09-03  2:05       ` Zhang, Jerry (Junwei) [this message]
2018-08-31 13:10   ` [PATCH 3/3] drm/amdgpu: fix idle state and bulk_moveavle flag Christian König
     [not found]     ` <20180831131019.2486-3-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-08-31 15:19       ` Michel Dänzer
2018-08-31 15:15   ` [PATCH 1/3] drm/ttm: fix ttm_bo_bulk_move_helper Michel Dänzer
     [not found]     ` <a186be44-e64b-f408-fa30-bb81b59322f6-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-08-31 15:17       ` Christian König
     [not found]         ` <c8d0d5c6-1221-26be-4005-2f7ae21ade80-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-09-06 10:02           ` Huang Rui
2018-09-06 10:06             ` Christian König
     [not found]               ` <3be7e67a-2ffe-21c0-2160-69a330413858-5C7GfCeVMHo@public.gmane.org>
2018-09-07 11:02                 ` Huang, Ray
     [not found]                   ` <CY1PR12MB0043539F7EE805B3A98E1FE2EC000-1s8aH8ViOEdbUNsZNX5b0gdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-09-07 11:18                     ` Christian König
     [not found]                       ` <24dbe7c4-63df-b8a7-28c3-df0e9866841f-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-09-08  7:54                         ` Huang Rui
2018-09-08 10:43                           ` Christian König
2018-09-03  2:05   ` Zhang, Jerry (Junwei)

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=5B8C96FE.4070805@amd.com \
    --to=jerry.zhang-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=michel.daenzer-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