Re: [Intel-gfx] [PATCH 6/9] drm/i915: Split execlist priority queue into rbtree + linked list

2017-05-05 Thread Chris Wilson
On Fri, May 05, 2017 at 03:20:08PM +0100, Tvrtko Ursulin wrote: > > On 05/05/2017 14:51, Chris Wilson wrote: > >On Fri, May 05, 2017 at 02:37:41PM +0100, Tvrtko Ursulin wrote: > >> > >>On 05/05/2017 14:32, Chris Wilson wrote: > >>>On Fri, May 05, 2017 at 02:19:07PM +0100, Tvrtko Ursulin wrote: >

Re: [Intel-gfx] [PATCH 6/9] drm/i915: Split execlist priority queue into rbtree + linked list

2017-05-05 Thread Tvrtko Ursulin
On 05/05/2017 15:04, Chris Wilson wrote: On Fri, May 05, 2017 at 02:50:46PM +0100, Tvrtko Ursulin wrote: On 03/05/2017 12:37, Chris Wilson wrote: [snip] +#include + +static inline void __list_del_many(struct list_head *head, + struct list_head *first) +{ +

Re: [Intel-gfx] [PATCH 6/9] drm/i915: Split execlist priority queue into rbtree + linked list

2017-05-05 Thread Tvrtko Ursulin
On 05/05/2017 14:51, Chris Wilson wrote: On Fri, May 05, 2017 at 02:37:41PM +0100, Tvrtko Ursulin wrote: On 05/05/2017 14:32, Chris Wilson wrote: On Fri, May 05, 2017 at 02:19:07PM +0100, Tvrtko Ursulin wrote: On 03/05/2017 12:37, Chris Wilson wrote: struct intel_engine_cs { @@ -367,6

Re: [Intel-gfx] [PATCH 6/9] drm/i915: Split execlist priority queue into rbtree + linked list

2017-05-05 Thread Chris Wilson
On Fri, May 05, 2017 at 02:50:46PM +0100, Tvrtko Ursulin wrote: > > On 03/05/2017 12:37, Chris Wilson wrote: > > [snip] > > >+#include > >+ > >+static inline void __list_del_many(struct list_head *head, > >+ struct list_head *first) > >+{ > >+head->next =

Re: [Intel-gfx] [PATCH 6/9] drm/i915: Split execlist priority queue into rbtree + linked list

2017-05-05 Thread Chris Wilson
On Fri, May 05, 2017 at 02:37:41PM +0100, Tvrtko Ursulin wrote: > > On 05/05/2017 14:32, Chris Wilson wrote: > >On Fri, May 05, 2017 at 02:19:07PM +0100, Tvrtko Ursulin wrote: > >> > >>On 03/05/2017 12:37, Chris Wilson wrote: > >>>struct intel_engine_cs { > >>>@@ -367,6 +373,7 @@ struct

Re: [Intel-gfx] [PATCH 6/9] drm/i915: Split execlist priority queue into rbtree + linked list

2017-05-05 Thread Tvrtko Ursulin
On 03/05/2017 12:37, Chris Wilson wrote: [snip] +#include + +static inline void __list_del_many(struct list_head *head, + struct list_head *first) +{ + head->next = first; + first->prev = head; +} Btw it is similar to __list_cut_position, but

Re: [Intel-gfx] [PATCH 6/9] drm/i915: Split execlist priority queue into rbtree + linked list

2017-05-05 Thread Tvrtko Ursulin
On 05/05/2017 14:32, Chris Wilson wrote: On Fri, May 05, 2017 at 02:19:07PM +0100, Tvrtko Ursulin wrote: On 03/05/2017 12:37, Chris Wilson wrote: struct intel_engine_cs { @@ -367,6 +373,7 @@ struct intel_engine_cs { /* Execlists */ struct tasklet_struct irq_tasklet; +

Re: [Intel-gfx] [PATCH 6/9] drm/i915: Split execlist priority queue into rbtree + linked list

2017-05-05 Thread Chris Wilson
On Fri, May 05, 2017 at 02:19:07PM +0100, Tvrtko Ursulin wrote: > > On 03/05/2017 12:37, Chris Wilson wrote: > > struct intel_engine_cs { > >@@ -367,6 +373,7 @@ struct intel_engine_cs { > > > > /* Execlists */ > > struct tasklet_struct irq_tasklet; > >+struct execlist_priolist

Re: [Intel-gfx] [PATCH 6/9] drm/i915: Split execlist priority queue into rbtree + linked list

2017-05-05 Thread Tvrtko Ursulin
On 03/05/2017 12:37, Chris Wilson wrote: All the requests at the same priority are executed in FIFO order. They do not need to be stored in the rbtree themselves, as they are a simple list within a level. If we move the requests at one priority into a list, we can then reduce the rbtree to the

[Intel-gfx] [PATCH 6/9] drm/i915: Split execlist priority queue into rbtree + linked list

2017-05-03 Thread Chris Wilson
All the requests at the same priority are executed in FIFO order. They do not need to be stored in the rbtree themselves, as they are a simple list within a level. If we move the requests at one priority into a list, we can then reduce the rbtree to the set of priorities. This should keep the