From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 107403] Quadratic behavior due to leaking fence contexts in reservation objects
Date: Fri, 27 Jul 2018 12:20:54 +0000 [thread overview]
Message-ID: <bug-107403-502@http.bugs.freedesktop.org/> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1837 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=107403
Bug ID: 107403
Summary: Quadratic behavior due to leaking fence contexts in
reservation objects
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: bas@basnieuwenhuizen.nl
As part of the Vulkan CTS, radv creates about 30k AMDGPU contexts (about 1-20
live at the same time though).
Each of those creates a bunch of fence contexts, one for each ring, to use for
fences created from submitted jobs.
However, as part of running jobs, fences with those contexts get attached to
the
vm->root.base.bo->tbo.resv of the corresponding vm. Which means that at some
point we have tens of thousands of fences attached to it as they never get
removed. They only ever get deduplicated with a later fence from the same fence
context, so fences from destroyed contexts never get removed.
Then in amdgpu_gem_va_ioctl -> amdgpu_vm_clear_freed ->
amdgpu_vm_bo_update_mapping we do an amdgpu_sync_resv, which tries to add that
to an amdgpu_sync object. Which only has a 16-entry hashtable, so adding the
fences to the hashtable results in quadratic behavior.
Combine this with doing sparse buffer tests at the end, which do lots of VA
operations this results in tests taking 20+ minuts.
So I could reduce the number of amdgpu contexts a bit in radv, but the bigger
issue in my opnion is that we are pretty much leaking and never reclaiming the
fences.
Any idea how to best remove some signalled fences?
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 3147 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2018-07-27 12:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-27 12:20 bugzilla-daemon [this message]
2018-07-27 12:30 ` [Bug 107403] Quadratic behavior due to leaking fence contexts in reservation objects bugzilla-daemon
2018-07-27 12:46 ` bugzilla-daemon
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=bug-107403-502@http.bugs.freedesktop.org/ \
--to=bugzilla-daemon@freedesktop.org \
--cc=dri-devel@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.