All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 111305] `ttm_bo_handle_move_mem` sometimes takes more than 50 ms
@ 2019-08-06 10:15 bugzilla-daemon
  2019-08-08 17:01 ` bugzilla-daemon
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: bugzilla-daemon @ 2019-08-06 10:15 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 2109 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=111305

            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=144954&action=edit
Screenshot from callgraph excerpt

With Linux 5.3-rc3 and pm-graph’s `sleepgraph.py` [1] measuring suspend times
on the Dell OptiPlex 5040 with an external AMD graphics card, the driver needs
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.

[-- Attachment #1.2: Type: text/html, Size: 3630 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 111305] `ttm_bo_handle_move_mem` sometimes takes more than 50 ms
  2019-08-06 10:15 [Bug 111305] `ttm_bo_handle_move_mem` sometimes takes more than 50 ms bugzilla-daemon
@ 2019-08-08 17:01 ` bugzilla-daemon
  2019-08-09  0:05 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2019-08-08 17:01 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 410 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=111305

--- Comment #1 from Alex Deucher <alexdeucher@gmail.com> ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1209 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 111305] `ttm_bo_handle_move_mem` sometimes takes more than 50 ms
  2019-08-06 10:15 [Bug 111305] `ttm_bo_handle_move_mem` sometimes takes more than 50 ms bugzilla-daemon
  2019-08-08 17:01 ` bugzilla-daemon
@ 2019-08-09  0:05 ` bugzilla-daemon
  2019-08-09 15:03 ` bugzilla-daemon
  2019-11-19  9:38 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2019-08-09  0:05 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 615 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=111305

--- Comment #2 from Paul Menzel <pmenzel+bugs.freedesktop.org@molgen.mpg.de> ---
(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.

[-- Attachment #1.2: Type: text/html, Size: 1511 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 111305] `ttm_bo_handle_move_mem` sometimes takes more than 50 ms
  2019-08-06 10:15 [Bug 111305] `ttm_bo_handle_move_mem` sometimes takes more than 50 ms bugzilla-daemon
  2019-08-08 17:01 ` bugzilla-daemon
  2019-08-09  0:05 ` bugzilla-daemon
@ 2019-08-09 15:03 ` bugzilla-daemon
  2019-11-19  9:38 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2019-08-09 15:03 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 488 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=111305

--- Comment #3 from Alex Deucher <alexdeucher@gmail.com> ---
(In reply to Paul Menzel from comment #2)
> 
> Just to clarify, the VRAM on the external graphics device is powered off,
> correct?

Correct.

> 
> 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.

[-- Attachment #1.2: Type: text/html, Size: 1398 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 111305] `ttm_bo_handle_move_mem` sometimes takes more than 50 ms
  2019-08-06 10:15 [Bug 111305] `ttm_bo_handle_move_mem` sometimes takes more than 50 ms bugzilla-daemon
                   ` (2 preceding siblings ...)
  2019-08-09 15:03 ` bugzilla-daemon
@ 2019-11-19  9:38 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2019-11-19  9:38 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 805 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=111305

Martin Peres <martin.peres@free.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |MOVED

--- Comment #4 from Martin Peres <martin.peres@free.fr> ---
-- 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.

[-- Attachment #1.2: Type: text/html, Size: 2392 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-19  9:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-06 10:15 [Bug 111305] `ttm_bo_handle_move_mem` sometimes takes more than 50 ms bugzilla-daemon
2019-08-08 17:01 ` bugzilla-daemon
2019-08-09  0:05 ` bugzilla-daemon
2019-08-09 15:03 ` bugzilla-daemon
2019-11-19  9:38 ` bugzilla-daemon

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.