sna: the active cache is not marked as purgeable, so skip checking it

Otherwise we do a lot of list walking for no-ops.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-12-18 20:28:18 +00:00
parent 8df9653135
commit d0ee695ef0
1 changed files with 1 additions and 8 deletions

View File

@ -1338,12 +1338,6 @@ void kgem_purge_cache(struct kgem *kgem)
kgem_bo_free(kgem, bo);
}
for (i = 0; i < ARRAY_SIZE(kgem->active); i++) {
list_for_each_entry_safe(bo, next, &kgem->active[i], list)
if (!kgem_bo_is_retained(kgem, bo))
kgem_bo_free(kgem, bo);
}
kgem->need_purge = false;
}
@ -1393,8 +1387,7 @@ bool kgem_expire_cache(struct kgem *kgem)
bo = list_last_entry(&kgem->inactive[i],
struct kgem_bo, list);
if (kgem_bo_is_retained(kgem, bo) &&
bo->delta > expire) {
if (bo->delta > expire) {
idle = false;
break;
}