Re: [Intel-gfx] [PATCH v2] drm/i915: Optimistically spin for the request completion

2015-03-12 Thread Daniel Vetter
On Wed, Mar 11, 2015 at 09:18:19PM +, Chris Wilson wrote: > On Wed, Mar 11, 2015 at 03:29:19PM +, Chris Wilson wrote: > > + while (!need_resched()) { > > + if (i915_gem_request_completed(req, true)) { > > + ret = 0; > > + goto out; > > +

Re: [Intel-gfx] [PATCH v2] drm/i915: Optimistically spin for the request completion

2015-03-12 Thread Chris Wilson
On Wed, Mar 11, 2015 at 09:18:19PM +, Chris Wilson wrote: > Arguably busy-spinning on an idle system isn't totally evil, but it > certainly is likely to come at a power cost. On the other hand, spinning > is relatively rare outside of benchmarks. Rare enough to be useful? As a counterpoint, I

Re: [Intel-gfx] [PATCH v2] drm/i915: Optimistically spin for the request completion

2015-03-11 Thread shuang . he
Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang...@intel.com) Task id: 5934 -Summary- Platform Delta drm-intel-nightly Series Applied PNV -9 281/281

Re: [Intel-gfx] [PATCH v2] drm/i915: Optimistically spin for the request completion

2015-03-11 Thread Chris Wilson
On Wed, Mar 11, 2015 at 03:29:19PM +, Chris Wilson wrote: > + while (!need_resched()) { > + if (i915_gem_request_completed(req, true)) { > + ret = 0; > + goto out; > + } > + > + if (timeout && time_after_eq(jiffies,

[Intel-gfx] [PATCH v2] drm/i915: Optimistically spin for the request completion

2015-03-11 Thread Chris Wilson
This provides a nice boost to mesa in swap bound scenarios (as mesa throttles itself to the previous frame and given the scenario that will complete shortly). It will also provide a good boost to systems running with semaphores disabled and so frequently waiting on the GPU as it switches rings. In