Chris Wilson <ch...@chris-wilson.co.uk> writes:

> We can reduce the frequency of calling madvise by only using it for
> buffers that are inactive (busy buffers will be pinned by they use by the
> GPU, so should not significantly add to mempressure, but will still be
> reaped by our timed cache.)
>
> v2: Remember about APPLE_purgeable_memory that also calls
> brw_bo_madvise() and so leave the buffer as purgeable needing to be
> recovered prior to use.

I don't think this is a good idea.  We should be marking our buffers
purgeable as they enter the cache, because the point of purgeable is to
make it so that when the application goes from being busy to being idle,
the buffers that used to be in active use can be evicted by the kernel.
In steady state rendering, we don't need madvise at all because we'll
free inactive buffers in a second anyway.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to