diff options
| author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-18 20:28:18 +0000 |
|---|---|---|
| committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-18 20:28:18 +0000 |
| commit | d0ee695ef091671e2cc69b773f517030ebe961b2 (patch) | |
| tree | fa3ed774e5a302a874277d5fbe7ca404903814d6 | |
| parent | 8df9653135c6390ed699ba9f8cbf374b2cc84396 (diff) | |
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>
| -rw-r--r-- | src/sna/kgem.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 6ac13427..3d5d4b0c 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -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; } |
