[Intel-gfx] Patch set to enable cache shrinking
shaohua.li at intel.com
Thu Jun 11 08:45:07 CEST 2009
On Sat, Jun 06, 2009 at 04:45:56PM +0800, Chris Wilson wrote:
> Hi guys, this is just a dump of my outstanding patches, plus an initial
> attempt at implementing purgeable objects. The interface is quite simple
> and borrows heavily from madvise DONTNEED/WILLNEED, will a single return
> value indicating whether the backing pages still exist. This can then be
> used by user-space to mark caches as purgeable and lazily update them
> under memory pressure.
It appears all gem object pages are dirty, as userspace always writes gem object first
and then execute some gpu ins. For a dirty page, i915_gem_object_unbind can't help.
shmem dirty pages must be swapped out and then they can be freed.
But as userspace is caching GEM object, it knows which object's content is useless.
When kernel gets such info, kernel can free dirty gem object's page without swap.
I'll sent out two reference patches to demonstrate the idea. Maybe they can be
integrated into your patches.
More information about the Intel-gfx