On 22/12/15 06:20, ankitprasad.r.sharma@xxxxxxxxx wrote:
From: Chris Wilson <chris at chris-wilson.co.uk> If we run out of stolen memory when trying to allocate an object, see if we can reap enough purgeable objects to free up enough contiguous free space for the allocation. This is in principle very much like evicting objects to free up enough contiguous space in the vma when binding a new object - and you will be forgiven for thinking that the code looks very similar. At the moment, we do not allow userspace to allocate objects in stolen, so there is neither the memory pressure to trigger stolen eviction nor any purgeable objects inside the stolen arena. However, this will change in the near future, and so better management and defragmentation of stolen memory will become a real issue. v2: Remember to remove the drm_mm_node. v3: Rebased to the latest drm-intel-nightly (Ankit) v4: corrected if-else braces format (Tvrtko/kerneldoc) v5: Rebased to the latest drm-intel-nightly (Ankit) Added a seperate list to maintain purgable objects from stolen memory region (Chris/Daniel) v6: Compiler optimization (merging 2 single loops into one for() loop), corrected code for object eviction, retire_requests before starting object eviction (Chris) v7: Added kernel doc for i915_gem_object_create_stolen() v8: Check for struct_mutex lock before creating object from stolen region (Tvrtko) v9: Renamed variables to make usage clear, added comment, removed onetime used macro (Tvrtko) v10: Avoid masking of error when stolen_alloc fails (Tvrtko) v11: Renamed stolen_link to tmp_link, as it may be used for other purposes too (Chris) Used ERR_CAST to cast error pointers while returning v12: Added lockdep_assert before starting stolen-backed object eviction (Chris)
On the basis that v11 and v12 are simple enough compared to my r-b from v10: Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> Regards, Tvrtko _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx