[Intel-gfx] [PATCH 2/2] drm/i915: Change GEM throttling to be 20ms like the comment says.

Jesse Barnes jbarnes at virtuousgeek.org
Thu Jun 4 12:14:57 CEST 2009


On Wed,  3 Jun 2009 11:39:50 +0000
Eric Anholt <eric at anholt.net> wrote:

> keithp didn't like the original 20ms plan because a cooperative
> client could be starved by an uncooperative client.  I think may even
> have been problems with cooperative clients versus cooperative
> clients.  So keithp changed throttle to just wait for the second to
> last seqno emitted by that client. It worked well, until we started
> getting more round-trips to the server due to DRI2 -- the server
> throttles in BlockHandler, and so if you did more than one round trip
> after finishing your frame, you'd end up unintentionally syncing to
> the swap.
> 
> Fix this by keeping track of the client's requests, so the client can
> when it has an outstanding request over 20ms old.  This should have
> non-starving behavior, good behavior in the presence of restarts, and
> less waiting. Improves high-settings openarena performance on my
> machine by 50%.

I wish we didn't have to use cooperative scheduling at all... but
that's another topic.  Patch looks reasonable.

> +	mutex_lock(&dev->struct_mutex);
> +	while (!list_empty(&i915_file_priv->mm.request_list))
> +		list_del_init(i915_file_priv->mm.request_list.next);
> +	mutex_unlock(&dev->struct_mutex);
> +}

For list clearing, I see other bits of coding using
list_for_each_entry_safe to list_del_init each link...  Not sure if you
want to reuse that type of expression here to keep things consistent.
Other than that the patch looks good (good to see the timeout handling
fixed up too).

Reviewed-by: Jesse Barnes <jbarnes at virtuousgeek.org>

Jesse



More information about the Intel-gfx mailing list