Re: [PATCH v2] drm/i915: Flush the idle-worker for debugfs/i915_drop_caches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2017-10-18 at 13:16 +0100, Chris Wilson wrote:
> After being requested to idle the GPU, flush the idle worker to drop the
> residual active state, and any internal object caches.
> 
> v2: By popular demand, introduce DROP_IDLE for fine-grained control from
> userspace, though it should be used as part of a
> 	DROP_ACTIVE | DROP_RETIRE | DROP_IDLE | DROP_FREED
> sequence.
> v3: Convert to BIT() to sell it to Joonas.
> 
> References: https://bugs.freedesktop.org/show_bug.cgi?id=102655
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>

<SNIP>

> @@ -4206,7 +4208,8 @@ i915_drop_caches_set(void *data, u64 val)
>  	struct drm_device *dev = &dev_priv->drm;
>  	int ret = 0;
>  
> -	DRM_DEBUG("Dropping caches: 0x%08llx\n", val);
> +	DRM_DEBUG("Dropping caches: 0x%08llx [0x%08llx]\n",
> +		  val, val & DROP_ALL);
>  
>  	/* No need to check and wait for gpu resets, only libdrm auto-restarts
>  	 * on ioctls on -EAGAIN. */
> @@ -4237,6 +4240,9 @@ i915_drop_caches_set(void *data, u64 val)
>  		i915_gem_shrink_all(dev_priv);
>  	fs_reclaim_release(GFP_KERNEL);

We have call to i915_gem_wait_for_idle (function with no kerneldoc)
above so it might be worthy to comment something along;

	/* Idling the GT will release all internal objects, too. */
> +	if (val & DROP_IDLE)
> +		drain_delayed_work(&dev_priv->gt.idle_work);

And maybe add kerneldoc for i915_gem_wait_for_idle as follow-up.

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux