From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 111305] `ttm_bo_handle_move_mem` sometimes takes more than 50 ms Date: Tue, 06 Aug 2019 10:15:16 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1031688716==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id E18A46E34B for ; Tue, 6 Aug 2019 10:15:16 +0000 (UTC) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1031688716== Content-Type: multipart/alternative; boundary="15650865162.fa3Ee.5675" Content-Transfer-Encoding: 7bit --15650865162.fa3Ee.5675 Date: Tue, 6 Aug 2019 10:15:16 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D111305 Bug ID: 111305 Summary: `ttm_bo_handle_move_mem` sometimes takes more than 50 ms Product: DRI Version: XOrg git Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: DRM/AMDgpu Assignee: dri-devel@lists.freedesktop.org Reporter: pmenzel+bugs.freedesktop.org@molgen.mpg.de Created attachment 144954 --> https://bugs.freedesktop.org/attachment.cgi?id=3D144954&action=3Dedit Screenshot from callgraph excerpt With Linux 5.3-rc3 and pm-graph=E2=80=99s `sleepgraph.py` [1] measuring sus= pend times on the Dell OptiPlex 5040 with an external AMD graphics card, the driver ne= eds 2.1 seconds to suspend the device, which is too long. $ lspci -nn -s 01: 01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Oland XT [Radeon HD 8670 / R7 250/350] [1002:6610] (rev 81) 01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] [1002:aab0] Here is the time: 0000:01:00.0 suspend (2170.017 ms @ 5037.143762 to 5039.313779) Looking into the call graph, 1.4 s are spent in `ttm_bo_evict_mm`. ttm_bo_evict_mm [ttm] (1438.050 ms @ 5037.601941) As you can see in the attached screenshot, there are some `ttm_bo_handle_move_mem` call which take several milliseconds adding up to = the long time. - ttm_mem_evict_first [ttm] (304.860 ms @ 5037.705809) _raw_spin_lock mutex_trylock (0.000 ms @ 5037.705809) + ttm_bo_del_from_lru [ttm] - ttm_bo_evict [ttm] (304.857 ms @ 5037.705810) amdgpu_evict_flags [amdgpu] (0.000 ms @ 5037.705810) ttm_bo_mem_space [ttm] (0.001 ms @ 5037.705811) ttm_bo_handle_move_mem [ttm] (304.853 ms @ 5037.705812) [1]: https://github.com/intel/pm-graph --=20 You are receiving this mail because: You are the assignee for the bug.= --15650865162.fa3Ee.5675 Date: Tue, 6 Aug 2019 10:15:16 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated
Bug ID 111305
Summary `ttm_bo_handle_move_mem` sometimes takes more than 50 ms
Product DRI
Version XOrg git
Hardware Other
OS All
Status NEW
Severity normal
Priority medium
Component DRM/AMDgpu
Assignee dri-devel@lists.freedesktop.org
Reporter pmenzel+bugs.freedesktop.org@molgen.mpg.de

Created attach=
ment 144954 [details]
Screenshot from callgraph excerpt

With Linux 5.3-rc3 and pm-graph=E2=80=99s `sleepgraph.py` [1] measuring sus=
pend times
on the Dell OptiPlex 5040 with an external AMD graphics card, the driver ne=
eds
2.1 seconds to suspend the device, which is too long.

    $ lspci -nn -s 01:
    01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc.
[AMD/ATI] Oland XT [Radeon HD 8670 / R7 250/350] [1002:6610] (rev 81)
    01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Cape
Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] [1002:aab0]

Here is the time:

    0000:01:00.0 suspend (2170.017 ms @ 5037.143762 to 5039.313779)

Looking into the call graph, 1.4 s are spent in `ttm_bo_evict_mm`.

    ttm_bo_evict_mm [ttm] (1438.050 ms @ 5037.601941)

As you can see in the attached screenshot, there are some
`ttm_bo_handle_move_mem` call which take several milliseconds adding up to =
the
long time.

    - ttm_mem_evict_first [ttm] (304.860 ms @ 5037.705809)
        _raw_spin_lock
        mutex_trylock (0.000 ms @ 5037.705809)
        + ttm_bo_del_from_lru [ttm]
        - ttm_bo_evict [ttm] (304.857 ms @ 5037.705810)
            amdgpu_evict_flags [amdgpu] (0.000 ms @ 5037.705810)
            ttm_bo_mem_space [ttm] (0.001 ms @ 5037.705811)
            ttm_bo_handle_move_mem [ttm] (304.853 ms @ 5037.705812)

[1]: https://github.com/intel=
/pm-graph


You are receiving this mail because:
  • You are the assignee for the bug.
= --15650865162.fa3Ee.5675-- --===============1031688716== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============1031688716==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 111305] `ttm_bo_handle_move_mem` sometimes takes more than 50 ms Date: Thu, 08 Aug 2019 17:01:01 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0785487875==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 7ADA46E03D for ; Thu, 8 Aug 2019 17:01:01 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0785487875== Content-Type: multipart/alternative; boundary="15652836610.76eD.5609" Content-Transfer-Encoding: 7bit --15652836610.76eD.5609 Date: Thu, 8 Aug 2019 17:01:01 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D111305 --- Comment #1 from Alex Deucher --- The contents of vram have to be moved to system memory on suspend since vra= m is powered off. Depending on general memory pressure at suspend time it may t= ake a while to get the contexts of vram into system ram. --=20 You are receiving this mail because: You are the assignee for the bug.= --15652836610.76eD.5609 Date: Thu, 8 Aug 2019 17:01:01 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Commen= t # 1 on bug 11130= 5 from Alex Deucher
The contents of vram have to be moved to system memory on susp=
end since vram is
powered off.  Depending on general memory pressure at suspend time it may t=
ake
a while to get the contexts of vram into system ram.


You are receiving this mail because:
  • You are the assignee for the bug.
= --15652836610.76eD.5609-- --===============0785487875== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============0785487875==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 111305] `ttm_bo_handle_move_mem` sometimes takes more than 50 ms Date: Fri, 09 Aug 2019 00:05:08 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0648704894==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [IPv6:2610:10:20:722:a800:ff:fe98:4b55]) by gabe.freedesktop.org (Postfix) with ESMTP id B4A456ECE3 for ; Fri, 9 Aug 2019 00:05:08 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0648704894== Content-Type: multipart/alternative; boundary="15653091082.4fA2.1935" Content-Transfer-Encoding: 7bit --15653091082.4fA2.1935 Date: Fri, 9 Aug 2019 00:05:08 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D111305 --- Comment #2 from Paul Menzel --- (In reply to Alex Deucher from comment #1) > The contents of vram have to be moved to system memory on suspend since v= ram > is powered off. Depending on general memory pressure at suspend time it = may > take a while to get the contexts of vram into system ram. Just to clarify, the VRAM on the external graphics device is powered off, correct? Are there any tools to analyze these delays? --=20 You are receiving this mail because: You are the assignee for the bug.= --15653091082.4fA2.1935 Date: Fri, 9 Aug 2019 00:05:08 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Commen= t # 2 on bug 11130= 5 from Paul = Menzel
(In reply to Alex Deucher from comment #1)
> The contents of vram have to be moved to system =
memory on suspend since vram
> is powered off.  Depending on general memory pressure at suspend time =
it may
> take a while to get the contexts of vram into system ram.

Just to clarify, the VRAM on the external graphics device is powered off,
correct?

Are there any tools to analyze these delays?


You are receiving this mail because:
  • You are the assignee for the bug.
= --15653091082.4fA2.1935-- --===============0648704894== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============0648704894==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 111305] `ttm_bo_handle_move_mem` sometimes takes more than 50 ms Date: Fri, 09 Aug 2019 15:03:35 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0038792488==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 3DC706EE2B for ; Fri, 9 Aug 2019 15:03:35 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0038792488== Content-Type: multipart/alternative; boundary="15653630150.6FaEb.7250" Content-Transfer-Encoding: 7bit --15653630150.6FaEb.7250 Date: Fri, 9 Aug 2019 15:03:35 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D111305 --- Comment #3 from Alex Deucher --- (In reply to Paul Menzel from comment #2) >=20 > Just to clarify, the VRAM on the external graphics device is powered off, > correct? Correct. >=20 > Are there any tools to analyze these delays? I guess profiling the relevant functions in ttm. See if we are waiting on pages, etc. --=20 You are receiving this mail because: You are the assignee for the bug.= --15653630150.6FaEb.7250 Date: Fri, 9 Aug 2019 15:03:35 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Commen= t # 3 on bug 11130= 5 from Alex Deucher
(In reply to Paul Menzel from comment #2)
>=20
> Just to clarify, the VRAM on the external graphics device is powered o=
ff,
> correct?

Correct.

>=20
> Are there any tools to analyze these delays?

I guess profiling the relevant functions in ttm.  See if we are waiting on
pages, etc.


You are receiving this mail because:
  • You are the assignee for the bug.
= --15653630150.6FaEb.7250-- --===============0038792488== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============0038792488==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 111305] `ttm_bo_handle_move_mem` sometimes takes more than 50 ms Date: Tue, 19 Nov 2019 09:38:41 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1425558152==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id EA51E6F464 for ; Tue, 19 Nov 2019 09:38:40 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1425558152== Content-Type: multipart/alternative; boundary="15741563202.B5AedA25.10554" Content-Transfer-Encoding: 7bit --15741563202.B5AedA25.10554 Date: Tue, 19 Nov 2019 09:38:40 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D111305 Martin Peres changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |MOVED --- Comment #4 from Martin Peres --- -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this = link to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/886. --=20 You are receiving this mail because: You are the assignee for the bug.= --15741563202.B5AedA25.10554 Date: Tue, 19 Nov 2019 09:38:40 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated <= span class=3D"fn">Martin Peres changed bug 11130= 5
What Removed Added
Status NEW RESOLVED
Resolution --- MOVED

Commen= t # 4 on bug 11130= 5 from Martin Peres
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been
closed from further activity.

You can subscribe and participate further through the new bug through this =
link
to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/886.


You are receiving this mail because:
  • You are the assignee for the bug.
= --15741563202.B5AedA25.10554-- --===============1425558152== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============1425558152==--