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

Chris Wilson chris at chris-wilson.co.uk
Wed Apr 19 07:42:33 UTC 2017


On Wed, Apr 19, 2017 at 08:34:56AM +0100, Chris Wilson wrote:
> @@ -677,9 +683,13 @@ static bool i915_guc_dequeue(struct intel_engine_cs *engine)
>  			port++;
>  		}
>  
> -		rb = rb_next(rb);
> -		rb_erase(&rq->priotree.node, &engine->execlist_queue);
> -		RB_CLEAR_NODE(&rq->priotree.node);
> +		if (rq->priotree.link.next == rq->priotree.link.prev) {
> +			rb = rb_next(rb);
> +			rb_erase(&plist->node, &engine->execlist_queue);
> +			if (plist->priority)
> +				kfree(plist);
> +		}
> +		list_del_init(&rq->priotree.link);

CI tells me this is the wrong way around, the del needs to be before the
free. Good job we have one !default priority around.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list