diff options
author | Kenneth Graunke <[email protected]> | 2019-05-29 23:20:31 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-05-29 23:38:01 -0700 |
commit | 53878f7a8989879b0f3ca37df9fd1fb37f2525ca (patch) | |
tree | 2588d726c0ebd097db6457a0b1c8a661ece62edd /src/gallium/drivers/iris/iris_binder.h | |
parent | 6244da8e23e5470d067680a9a3930db82dcb4db1 (diff) |
iris: Be lazy about cleaning up purged BOs in the cache.
Mathias Fröhlich reported that commit 6244da8e23e5470d067680 crashes.
list_for_each_entry_safe is safe against removing the current entry,
but iris_bo_cache_purge_bucket was potentially removing next entries
too, which broke our saved next pointer.
To fix this, don't bother with the iris_bo_cache_purge_bucket step.
We just detected a single entry where the kernel has purged the BO's
memory, and so it isn't a usable entry for our cache. We're about to
continue the search with the next BO. If that one's purged, we'll
clean it up too. And so on.
We may miss cleaning up purged BOs that are further down the list
after non-purged BOs...but that's probably fine. We still have the
time-based cleaner (cleanup_bo_cache) which will take care of them
eventually, and the kernel's already freed their memory, so it's not
that harmful to have a few kicking around a little longer.
Fixes: 6244da8e23e iris: Dig through the cache to find a BO in the right memzone
Reviewed-by: Chris Wilson <[email protected]>
Diffstat (limited to 'src/gallium/drivers/iris/iris_binder.h')
0 files changed, 0 insertions, 0 deletions