[Mesa-dev] [PATCH 2/2] i965: Warn for GTT fallbacks when mapping the batch/state buffers.
Kenneth Graunke
kenneth at whitecape.org
Sun Sep 17 14:06:49 UTC 2017
On Sunday, September 17, 2017 1:58:16 AM PDT Chris Wilson wrote:
> Quoting Kenneth Graunke (2017-09-16 09:31:27)
> > This shouldn't really happen in practice, but I hit it a couple of times
> > when running a driver with a bad memory leak. We may as well hook up
> > the warning, because if it ever triggers, we'll know something is wrong.
>
> Out of curiosity, the GTT mmap also failed? If you didn't have enough
> virtual space for one mmap, the other should also fail.
Oddly, the CPU map failed, but GTT maps continued working for a little
while. It did seem strange. I think maps did eventually quit working
altogether.
The leak in this case was when I'd botched the refcounting of the state
buffer, and just never freed them at all.
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
>
> How important is the requirement to flag GL_NO_MEMORY rather than
> explode? Even for batch reset, we should still be able to propagate the
> error back to the context (and cancel the operation to prevent further
> dismay, or install some dummy).
> -Chris
I don't think it's worth doing, personally. There are just so many ways
things can go off the rails. A better option might be to have brw_bufmgr
dump some VMA from unused BO cache entries, and then retry the map...
--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170917/14b1e3b3/attachment.sig>
More information about the mesa-dev
mailing list