提交 f2be9d68 编写于 作者: C Chris Wilson

drm/i915: Insert cond_resched() into i915_gem_free_objects

As we may have very many objects to free, check to see if the task needs
to be rescheduled whilst freeing them.
Suggested-by: NAndrea Arcangeli <aarcange@redhat.com>
Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170407102552.5781-4-chris@chris-wilson.co.ukReviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
上级 5ad08be7
...@@ -4302,6 +4302,8 @@ static void __i915_gem_free_objects(struct drm_i915_private *i915, ...@@ -4302,6 +4302,8 @@ static void __i915_gem_free_objects(struct drm_i915_private *i915,
intel_runtime_pm_put(i915); intel_runtime_pm_put(i915);
mutex_unlock(&i915->drm.struct_mutex); mutex_unlock(&i915->drm.struct_mutex);
cond_resched();
llist_for_each_entry_safe(obj, on, freed, freed) { llist_for_each_entry_safe(obj, on, freed, freed) {
GEM_BUG_ON(obj->bind_count); GEM_BUG_ON(obj->bind_count);
GEM_BUG_ON(atomic_read(&obj->frontbuffer_bits)); GEM_BUG_ON(atomic_read(&obj->frontbuffer_bits));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册