linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleksandr Natalenko <oleksandr@natalenko.name>
To: linux-kernel@vger.kernel.org
Cc: Ilkka Prusi <ilkka.prusi@pp.inet.fi>,
	Chris Rankin <rankincj@gmail.com>,
	Christian Koenig <christian.koenig@amd.com>,
	Huang Rui <ray.huang@amd.com>, David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel@ffwll.ch>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org,
	linaro-mm-sig@lists.linaro.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: WARNING: AMDGPU DRM warning in 5.11.9
Date: Thu, 25 Mar 2021 09:17:02 +0100	[thread overview]
Message-ID: <20210325081702.5kdzp7moqhcox65b@spock.localdomain> (raw)
In-Reply-To: <a38a3c04-4ac8-01a6-da69-a2bdaa54f61d@pp.inet.fi>

Hello.

On Thu, Mar 25, 2021 at 07:57:33AM +0200, Ilkka Prusi wrote:
> On 24.3.2021 16.16, Chris Rankin wrote:
> > Hi,
> > 
> > Theee warnings ares not present in my dmesg log from 5.11.8:
> > 
> > [   43.390159] ------------[ cut here ]------------
> > [   43.393574] WARNING: CPU: 2 PID: 1268 at
> > drivers/gpu/drm/ttm/ttm_bo.c:517 ttm_bo_release+0x172/0x282 [ttm]
> > [   43.401940] Modules linked in: nf_nat_ftp nf_conntrack_ftp cfg80211
> 
> Changing WARN_ON to WARN_ON_ONCE in drivers/gpu/drm/ttm/ttm_bo.c
> ttm_bo_release() reduces the flood of messages into single splat.
> 
> This warning appears to come from 57fcd550eb15bce ("drm/ttm: Warn on pinning
> without holding a reference)" and reverting it might be one choice.
> 
> 
> > 
> > There are others, but I am assuming there is a common cause here.
> > 
> > Cheers,
> > Chris
> > 
> 
> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> index a76eb2c14e8c..50b53355b265 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> @@ -514,7 +514,7 @@ static void ttm_bo_release(struct kref *kref)
>                  * shrinkers, now that they are queued for
>                  * destruction.
>                  */
> -               if (WARN_ON(bo->pin_count)) {
> +               if (WARN_ON_ONCE(bo->pin_count)) {
>                         bo->pin_count = 0;
>                         ttm_bo_del_from_lru(bo);
>                         ttm_bo_add_mem_to_lru(bo, &bo->mem);
> 
> 
> 
> --
>  - Ilkka
> 

WARN_ON_ONCE() will just hide the underlying problem. Do we know why
this happens at all?

Same for me, BTW, with v5.11.9:

```
[~]> lspci | grep VGA
0a:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] (rev c7)

[ 3676.033140] ------------[ cut here ]------------
[ 3676.033153] WARNING: CPU: 7 PID: 1318 at drivers/gpu/drm/ttm/ttm_bo.c:517 ttm_bo_release+0x375/0x500 [ttm]
…
[ 3676.033340] Hardware name: ASUS System Product Name/Pro WS X570-ACE, BIOS 3302 03/05/2021
…
[ 3676.033469] Call Trace:
[ 3676.033473]  ttm_bo_move_accel_cleanup+0x1ab/0x3a0 [ttm]
[ 3676.033478]  amdgpu_bo_move+0x334/0x860 [amdgpu]
[ 3676.033580]  ttm_bo_validate+0x1f1/0x2d0 [ttm]
[ 3676.033585]  amdgpu_cs_bo_validate+0x9b/0x1c0 [amdgpu]
[ 3676.033665]  amdgpu_cs_list_validate+0x115/0x150 [amdgpu]
[ 3676.033743]  amdgpu_cs_ioctl+0x873/0x20a0 [amdgpu]
[ 3676.033960]  drm_ioctl_kernel+0xb8/0x140 [drm]
[ 3676.033977]  drm_ioctl+0x222/0x3c0 [drm]
[ 3676.034071]  amdgpu_drm_ioctl+0x49/0x80 [amdgpu]
[ 3676.034145]  __x64_sys_ioctl+0x83/0xb0
[ 3676.034149]  do_syscall_64+0x33/0x40
…
[ 3676.034171] ---[ end trace 66e9865b027112f3 ]---
```

Thanks.

-- 
  Oleksandr Natalenko (post-factum)

  reply	other threads:[~2021-03-25  8:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24 14:16 WARNING: AMDGPU DRM warning in 5.11.9 Chris Rankin
2021-03-25  5:57 ` Ilkka Prusi
2021-03-25  8:17   ` Oleksandr Natalenko [this message]
2021-03-25  8:29     ` 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=20210325081702.5kdzp7moqhcox65b@spock.localdomain \
    --to=oleksandr@natalenko.name \
    --cc=airlied@linux.ie \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilkka.prusi@pp.inet.fi \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=rankincj@gmail.com \
    --cc=ray.huang@amd.com \
    --cc=sumit.semwal@linaro.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;
as well as URLs for NNTP newsgroup(s).