On Wed, Aug 04, 2010 at 12:20:36PM +0100, Chris Wilson wrote: > Based in a large part upon Daniel Vetter's implementation and adapted > for handling multiple rings in a single pass.
I've thought some more about this and I'm not sold on the idea that your One Scan to Rule Them All is any fairer than simply looping through all outstanding requests, like this: 1. (Re-)scan the inactive list and return the hole if found. 2. If there are any outstanding requests, wait for one to finish (on any ring), then go back to 1. 3. If there are no more outstanding requests issue a full gpu flush and wait, then go back to 2. 4. All hope is lost (and even evict_everything shouldn't be able to pull of miracles), return NULL. This way active buffers are scanned in retiring order, whereas your code scans them in issuing order. IMHO the former is the fairer approach for eviction when both rings are busy. I also think the code would look slightly less scary ;) Of course, this way we scan the inactive lru list completely for every outstanding request. But I don't think that's a problem because a) the current code does it, too, and b) we're stalling already, so there should be enough cpu power available. -Daniel -- Daniel Vetter Mail: dan...@ffwll.ch Mobile: +41 (0)79 365 57 48 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx