[PATCH] intel: Track whether a buffer is idle to avoid trips to the kernel.

Paul Menzel paulepanter at users.sourceforge.net
Mon Jan 20 14:08:03 PST 2014


Dear Eric,


thank you for the patch. I noticed one typo.


Am Mittwoch, den 15.01.2014, 00:38 -0800 schrieb Eric Anholt:
> I've seen a number of apps spending unreasonable amounts of time in
> drm_intel_bo_busy during the buffer mapping process.
> 
> We can't track idleness in general, in the case of buffers shared
> across processes.  But this should significantly reduce our overhead
> for checking for busy on things like VBOs.
> 
> Improves (unoptimized) glamor x11perf -f8text by 0.243334% +/-
> 0.161498% (n=1549), which has formerly been spending about .5% of its
> time hitting the kernel for drm_intel_gem_bo_busy().
> ---
> 
> I've still got a patch outstanding on the list for valgrind-cleaning
> the modesetting paths.  Since we're probably rolling a release soon,
> that might be nice to get in.
> 
>  intel/intel_bufmgr_gem.c | 23 ++++++++++++++++++++++-
>  1 file changed, 22 insertions(+), 1 deletion(-)
> 
> diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
> index 75e95e6..27ad576 100644
> --- a/intel/intel_bufmgr_gem.c
> +++ b/intel/intel_bufmgr_gem.c
> @@ -212,6 +212,15 @@ struct _drm_intel_bo_gem {
>  	bool reusable;
>  
>  	/**
> +	 * Boolean of whether the GPU is definitely not accessing the buffer.
> +	 *
> +	 * This is only valid when reusable, since non-reusable
> +	 * buffers are those that have been shared wth other

w*i*th

> +	 * processes, so we don't know their state.
> +	 */
> +	bool idle;
> +
> +	/**
>  	 * Size in bytes of this buffer and its relocation descendents.
>  	 *
>  	 * Used to avoid costly tree walking in

The rest looks fine.


Thanks,

Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20140120/94b36a5a/attachment.pgp>


More information about the dri-devel mailing list