[Mesa-dev] [PATCH 3/4] i965: Issue performance warnings for program cache related stalls.

Kenneth Graunke kenneth at whitecape.org
Fri Sep 26 14:36:20 PDT 2014


On Friday, September 26, 2014 04:41:14 PM Chris Wilson wrote:
> On Fri, Sep 26, 2014 at 08:36:39AM -0700, Kristian Høgsberg wrote:
> > On Fri, Aug 29, 2014 at 11:10:49PM -0700, Kenneth Graunke wrote:
> > > We don't really want extra buffer copying or stalls when mapping,
> > > so it'd be nice to know when it's happening.
> > > 
> > > Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> > 
> > Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>
> 
> This warns if the the program cache is currently being read by the GPU
> (expected) but a read-read (as used here) does not incur a stall.
> -Chris

Good catch!  Since we're doing a read-only mapping, and all of our relocations to this buffer have 0 for the write domains, GEM knows that nobody is altering it, so there shouldn't be a stall.  Even though i915_gem_set_domain_ioctl calls i915_gem_object_wait_rendering__nonblocking, it shouldn't actually wait.

Thanks for spotting this.  I'll drop this hunk.

I suppose this is a problem with my stall-warning code in general... drm_intel_bo_busy() == true does not necessarily imply that there will be a stall when mapping it.  I hadn't considered that.

It sounds like patch 4 (using unsynchronized mappings) is still useful though, as drm_intel_bo_subdata/pwrite doesn't know that it's safe to let the CPU write the buffer even while the GPU is reading it.

--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140926/4ffcd2e6/attachment.sig>


More information about the mesa-dev mailing list