[Intel-gfx] [PATCH] intel: Stop using sized buckets for the BO cache.

Keith Packard keithp at keithp.com
Mon Jun 7 09:14:00 CEST 2010


On Sun,  6 Jun 2010 23:52:59 -0700, Eric Anholt <eric at anholt.net> wrote:
> Theory being that we don't keep *that* many buffers around, and the
> pain of trying to find the right size in the list is less than the
> pain of using gratuitous amounts of system memory for our BOs.

And, if you sorted the list in size order, you could locate a matching
object in log instead of linear time, eliminating most of the potential
performance impact. Either a RB tree or a skip list might make sense
here; I'd probably use a skip list as those are easier to understand though.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20100607/82dc9a5d/attachment.sig>


More information about the Intel-gfx mailing list