All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Felix Kuehling <Felix.Kuehling@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/amdkfd: Fix recursive lock warnings
Date: Mon, 15 Mar 2021 11:17:36 +0100	[thread overview]
Message-ID: <e2405343-1968-49f0-3475-0b28b0e45663@gmail.com> (raw)
In-Reply-To: <20210313024351.10908-2-Felix.Kuehling@amd.com>

Am 13.03.21 um 03:43 schrieb Felix Kuehling:
> memalloc_nofs_save/restore are no longer sufficient to prevent recursive
> lock warnings when holding locks that can be taken in MMU notifiers. Use
> memalloc_noreclaim_save/restore instead.
>
> Fixes: f920e413ff9c ("mm: track mmu notifiers in fs_reclaim_acquire/release")
> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com> for this one.

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 318eeea577b5..bc3951b71079 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -93,13 +93,13 @@ struct amdgpu_prt_cb {
>   static inline void amdgpu_vm_eviction_lock(struct amdgpu_vm *vm)
>   {
>   	mutex_lock(&vm->eviction_lock);
> -	vm->saved_flags = memalloc_nofs_save();
> +	vm->saved_flags = memalloc_noreclaim_save();
>   }
>   
>   static inline int amdgpu_vm_eviction_trylock(struct amdgpu_vm *vm)
>   {
>   	if (mutex_trylock(&vm->eviction_lock)) {
> -		vm->saved_flags = memalloc_nofs_save();
> +		vm->saved_flags = memalloc_noreclaim_save();
>   		return 1;
>   	}
>   	return 0;
> @@ -107,7 +107,7 @@ static inline int amdgpu_vm_eviction_trylock(struct amdgpu_vm *vm)
>   
>   static inline void amdgpu_vm_eviction_unlock(struct amdgpu_vm *vm)
>   {
> -	memalloc_nofs_restore(vm->saved_flags);
> +	memalloc_noreclaim_restore(vm->saved_flags);
>   	mutex_unlock(&vm->eviction_lock);
>   }
>   

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2021-03-15 10:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-13  2:43 [PATCH 0/2] Two bugs found while rebasing my HMM branch Felix Kuehling
2021-03-13  2:43 ` [PATCH 1/2] drm/amdkfd: Fix recursive lock warnings Felix Kuehling
2021-03-15 10:17   ` Christian König [this message]
2021-03-13  2:43 ` [PATCH 2/2] drm/amdkfd: Fix resource cursor initialization Felix Kuehling
2021-03-15 10:22   ` Christian König
2021-03-15 13:08     ` Felix Kuehling
2021-03-15 13:15       ` 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=e2405343-1968-49f0-3475-0b28b0e45663@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=Felix.Kuehling@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.