dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Arcangeli <aarcange@redhat.com>
To: Martin Kepplinger <martink@posteo.de>,
	Thorsten Leemhuis <regressions@leemhuis.info>,
	daniel.vetter@intel.com, Dave Airlie <airlied@gmail.com>,
	Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Subject: [PATCH 5/5] i915: fence workqueue optimization
Date: Fri,  7 Apr 2017 01:23:47 +0200	[thread overview]
Message-ID: <20170406232347.988-6-aarcange@redhat.com> (raw)
In-Reply-To: <20170406232347.988-1-aarcange@redhat.com>

Insist to run llist_del_all() until the free_list is found empty, this
may avoid having to schedule more workqueues.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
---
 drivers/gpu/drm/i915/intel_display.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 24f303e..931f0c7 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14374,9 +14374,9 @@ static void intel_atomic_helper_free_state(struct drm_i915_private *dev_priv)
 	struct intel_atomic_state *state, *next;
 	struct llist_node *freed;
 
-	freed = llist_del_all(&dev_priv->atomic_helper.free_list);
-	llist_for_each_entry_safe(state, next, freed, freed)
-		drm_atomic_state_put(&state->base);
+	while ((freed = llist_del_all(&dev_priv->atomic_helper.free_list)))
+		llist_for_each_entry_safe(state, next, freed, freed)
+			drm_atomic_state_put(&state->base);
 }
 
 static void intel_atomic_helper_free_state_worker(struct work_struct *work)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-04-06 23:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22  8:38 [BUG][REGRESSION] i915 gpu hangs under load Martin Kepplinger
2017-03-22 10:36 ` Jani Nikula
2017-04-02 11:50   ` Thorsten Leemhuis
2017-04-02 12:13     ` Martin Kepplinger
2017-04-03 15:09       ` [Intel-gfx] " Jani Nikula
2017-04-06 23:23         ` [PATCH 0/5] " Andrea Arcangeli
2017-04-06 23:23           ` [PATCH 1/5] i915: avoid kernel hang caused by synchronize rcu struct_mutex deadlock Andrea Arcangeli
2017-04-07  9:05             ` [Intel-gfx] " Joonas Lahtinen
2017-04-06 23:23           ` [PATCH 2/5] i915: flush gem obj freeing workqueues to add accuracy to the i915 shrinker Andrea Arcangeli
2017-04-07 10:02             ` Chris Wilson
2017-04-07 13:06               ` Andrea Arcangeli
2017-04-07 15:30                 ` Chris Wilson
2017-04-07 16:48                   ` Andrea Arcangeli
2017-04-10  9:39                     ` Chris Wilson
2017-04-06 23:23           ` [PATCH 3/5] i915: initialize the free_list of the fencing atomic_helper Andrea Arcangeli
2017-04-07 10:35             ` Chris Wilson
2017-04-06 23:23           ` [PATCH 4/5] i915: schedule while freeing the lists of gem objects Andrea Arcangeli
2017-04-06 23:23           ` Andrea Arcangeli [this message]
2017-04-07  9:58             ` [PATCH 5/5] i915: fence workqueue optimization Chris Wilson
2017-04-07 13:13               ` Andrea Arcangeli
2017-04-10 10:15           ` [PATCH 0/5] Re: [BUG][REGRESSION] i915 gpu hangs under load Martin Kepplinger

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=20170406232347.988-6-aarcange@redhat.com \
    --to=aarcange@redhat.com \
    --cc=airlied@gmail.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martink@posteo.de \
    --cc=regressions@leemhuis.info \
    /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;
as well as URLs for NNTP newsgroup(s).