All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Remove second level open-coded rcu work
Date: Thu, 28 Feb 2019 09:43:20 +0000	[thread overview]
Message-ID: <155134699978.5847.16597682416537822529@skylake-alporthouse-com> (raw)
In-Reply-To: <fecaea1f-8c23-9695-71d5-a4485c0a06aa@linux.intel.com>

Quoting Tvrtko Ursulin (2019-02-28 09:38:36)
> 
> On 28/02/2019 08:29, Chris Wilson wrote:
> > @@ -143,7 +141,15 @@ static u32 __i915_gem_park(struct drm_i915_private *i915)
> >   
> >       intel_display_power_put(i915, POWER_DOMAIN_GT_IRQ, wakeref);
> >   
> > -     return i915->gt.epoch;
> > +     /*
> > +      * When we are idle, it is an opportune time to reap our caches.
> > +      * However, we have many objects that utilise RCU and the ordered
> > +      * i915->wq that this work is executing on. To try and flush any
> > +      * pending frees now we are idle, we first wait for an RCU grace
> > +      * period, and then queue a task (that will run last on the wq) to
> > +      * shrink and re-optimize the caches.
> > +      */
> > +     i915_globals_park();
> 
> I think this comment would be better placed in i915_globals_park.

In i915_globals_park(), we have

        /*
         * Defer shrinking the global slab caches (and other work) until
         * after a RCU grace period has completed with no activity. This
         * is to try and reduce the latency impact on the consumers caused
         * by us shrinking the caches the same time as they are trying to
         * allocate, with the assumption being that if we idle long enough
         * for an RCU grace period to elapse since the last use, it is likely
         * to be longer until we need the caches again.
         */

Yeah, the old comment is a bit too verbose now, but I think it's still
worth having a comment there to explain what's about to be done and why
we call it now.

/* Tell the world we are idle and reap the benefits! */

Too subtle?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-02-28  9:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-27 23:09 [PATCH 1/3] drm/i915: Make request allocation caches global Chris Wilson
2019-02-27 23:09 ` [PATCH 2/3] drm/i915: Make object/vma " Chris Wilson
2019-02-28  7:52   ` Tvrtko Ursulin
2019-02-27 23:09 ` [PATCH 3/3] drm/i915: Remove second level open-coded rcu work Chris Wilson
2019-02-28  7:56   ` Tvrtko Ursulin
2019-02-28  8:03     ` Chris Wilson
2019-02-28  8:29   ` [PATCH] " Chris Wilson
2019-02-28  9:38     ` Tvrtko Ursulin
2019-02-28  9:43       ` Chris Wilson [this message]
2019-02-28  9:55         ` Tvrtko Ursulin
2019-02-28 10:01           ` Chris Wilson
2019-02-28  0:22 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915: Make request allocation caches global Patchwork
2019-02-28  0:23 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-02-28  0:50 ` ✓ Fi.CI.BAT: success " Patchwork
2019-02-28  4:24 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-02-28  7:47 ` [PATCH 1/3] " Tvrtko Ursulin
2019-02-28  9:00 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915: Make request allocation caches global (rev2) Patchwork
2019-02-28  9:02 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-02-28  9:20 ` ✗ Fi.CI.BAT: failure " Patchwork

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=155134699978.5847.16597682416537822529@skylake-alporthouse-com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tvrtko.ursulin@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.