Skip to content

Commit

Permalink
drm/i915/gt: Move new timelines to the end of active_list
Browse files Browse the repository at this point in the history
When adding a new active timeline, place it at the end of the list. This
allows for intel_gt_retire_requests() to pick up the newcomer more
quickly and hopefully complete the retirement sooner. A miniscule
optimisation.

References: 7936a22 ("drm/i915/gt: Wait for new requests in intel_gt_retire_requests()")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191119162559.3313003-1-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Nov 19, 2019
1 parent d18580b commit 1683d24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/gt/intel_timeline.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ void intel_timeline_enter(struct intel_timeline *tl)
GEM_BUG_ON(!tl->active_count); /* overflow? */

spin_lock_irqsave(&timelines->lock, flags);
list_add(&tl->link, &timelines->active_list);
list_add_tail(&tl->link, &timelines->active_list);
spin_unlock_irqrestore(&timelines->lock, flags);
}

Expand Down

0 comments on commit 1683d24

Please sign in to comment.