Commit beacbd16 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Use our singlethreaded wq for freeing objects

As freeing the objects require serialisation on struct_mutex, we should
prefer to use our singlethreaded driver wq that is dedicated to work
requiring struct_mutex (hence serialised).The benefit should be less
clutter on the system wq, allowing it to make progress even when the
driver/struct_mutex is heavily contended.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180115122846.15193-1-chris@chris-wilson.co.ukReviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
parent 99e48bf9
...@@ -4732,7 +4732,7 @@ static void __i915_gem_free_object_rcu(struct rcu_head *head) ...@@ -4732,7 +4732,7 @@ static void __i915_gem_free_object_rcu(struct rcu_head *head)
* detour through a worker. * detour through a worker.
*/ */
if (llist_add(&obj->freed, &i915->mm.free_list)) if (llist_add(&obj->freed, &i915->mm.free_list))
schedule_work(&i915->mm.free_work); queue_work(i915->wq, &i915->mm.free_work);
} }
void i915_gem_free_object(struct drm_gem_object *gem_obj) void i915_gem_free_object(struct drm_gem_object *gem_obj)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment