[Intel-gfx] [RFC 5/7] drm/i915: Wait for GPU to finish before event stop in Gen Perf PMU
Chris Wilson
chris at chris-wilson.co.uk
Thu Jun 25 11:20:42 PDT 2015
On Thu, Jun 25, 2015 at 06:37:18PM +0100, Chris Wilson wrote:
> On Thu, Jun 25, 2015 at 06:31:52PM +0100, Robert Bragg wrote:
> > Thinking about the details of waiting for the last RPC command before
> > destroying the dest buffer and disabling OACONTROL these are the
> > requirements I see:
> > - we want free the dest buffer in a finite time, since it's large
> > (i.e. don't want to assume it's ok to keep around if allocated once)
>
> Skipping to this point, no you don't. If you mark the buffer as
> purgeable after you stop tracking it (though they may still be pending
> writes from the GPU), the system will preferentially reuse the buffer's
> backing storage when memory is tight (including waiting for the GPU).
> Similarly, you need to unpin it as soon as possible then the address
> space is available for reuse asap.
Or perhaps more to the point, you cannot free the buffer before the GPU
is finished. It doesn't matter if you want to free it synchronously, it
cannot happen before it would have been freed by dropping the active
reference anyway.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list