[Mesa-dev] [PATCH 1/3] winsys/radeon: Use separate caching buffer manager for each set of flags

Marek Olšák maraeo at gmail.com
Wed Oct 15 04:24:08 PDT 2014

With so many cache managers, memory usage might be a bigger problem.

Usually when a cache manager fails to allocate a new buffer, it clears
the cache and tries again. This is not so useful when there are a lot
of them, because the other managers aren't cleared.

A cache manager also has a limit on how large the cache can be to
prevent the cache from taking too much memory. Again, with several
cache managers, this becomes useless.

Finally, buffers are released from the cache during buffer_create and
buffer_destroy, so the managers really need to receive those 2 calls
regularly. If a cache manager is unused for a while, the cache won't
be cleared and it will occupy memory with old and unused buffers that
could otherwise be freed.


On Wed, Oct 15, 2014 at 9:27 AM, Michel Dänzer <michel at daenzer.net> wrote:
> On 10.10.2014 18:43, Marek Olšák wrote:
>> I wonder if it wouldn't be nicer if the cache manager understood that
>> there are buffers with different flags, so that we don't have to have
>> so many of them.
> Maybe, though it might increase CPU overhead in the cache manager?
> Thanks for the review.
> --
> Earthling Michel Dänzer            |                  http://www.amd.com
> Libre software enthusiast          |                Mesa and X developer

More information about the mesa-dev mailing list