Re: [PATCH 6/6] drm/i915/gt: Remove timeslice suppression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Chris,

On Mon, Jan 04, 2021 at 11:51:45AM +0000, Chris Wilson wrote:
> In the next patch, we remove the strict priority system and continuously

next patch?

[...]

> -static bool
> -timeslice_expired(const struct intel_engine_execlists *el,
> -		  const struct i915_request *rq)
> +static bool needs_timeslice(const struct intel_engine_cs *engine,
> +			    const struct i915_request *rq)
>  {
> -	return timer_expired(&el->timer) || timeslice_yield(el, rq);
> -}
> +	if (!intel_engine_has_timeslices(engine))
> +		return false;
>  
> -static int
> -switch_prio(struct intel_engine_cs *engine, const struct i915_request *rq)
> -{
> -	if (list_is_last(&rq->sched.link, &engine->active.requests))
> -		return engine->execlists.queue_priority_hint;
> +	/* If not currently active, or about to switch, wait for next event */
> +	if (!rq || __i915_request_is_complete(rq))
> +		return false;
>  
> -	return rq_prio(list_next_entry(rq, sched.link));
> -}
> +	/* We do not need to start the timeslice until after the ACK */
> +	if (READ_ONCE(engine->execlists.pending[0]))
> +		return false;
>  
> -static inline unsigned long
> -timeslice(const struct intel_engine_cs *engine)
> -{
> -	return READ_ONCE(engine->props.timeslice_duration_ms);
> +	/* If ELSP[1] is occupied, always check to see if worth slicing */
> +	if (!list_is_last_rcu(&rq->sched.link, &engine->active.requests))
> +		return true;
> +
> +	/* Otherwise, ELSP[0] is by itself, but may be waiting in the queue */
> +	if (!RB_EMPTY_ROOT(&engine->execlists.queue.rb_root))
> +		return true;
> +
> +	return !RB_EMPTY_ROOT(&engine->execlists.virtual.rb_root);
>  }

the above diff is quite unreadable and besides the patch does not
apply on the latest drm-tip.

In order to have a better review, I would suggest either one of
the following:

 - use a different diff algorithm for generating the patch
 - you rebase everything on top of the latest drm-tip so that I
   can apply and check
 - give me a branch so that I can checkout that branch and review
   it from there.

Thanks,
Andi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux