public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915: Flush the idle-worker for debugfs/i915_drop_caches
Date: Wed, 18 Oct 2017 15:55:49 +0300	[thread overview]
Message-ID: <1508331349.4517.7.camel@linux.intel.com> (raw)
In-Reply-To: <20171018121621.10824-1-chris@chris-wilson.co.uk>

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@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

<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@linux.intel.com>

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

  reply	other threads:[~2017-10-18 12:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17  9:26 [PATCH] drm/i915: Flush the idle-worker for debugfs/i915_drop_caches Chris Wilson
2017-10-17 10:19 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-10-18 12:16 ` [PATCH v2] " Chris Wilson
2017-10-18 12:55   ` Joonas Lahtinen [this message]
2017-10-18 12:47 ` ✓ Fi.CI.BAT: success for drm/i915: Flush the idle-worker for debugfs/i915_drop_caches (rev2) Patchwork
2017-10-18 21:36 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-10-18 21:55   ` Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1508331349.4517.7.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox