All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: John.C.Harrison@Intel.com
Cc: Intel-GFX@Lists.FreeDesktop.Org
Subject: Re: [PATCH v8 4/6] drm/i915: Interrupt driven fences
Date: Fri, 13 May 2016 08:27:20 +0100	[thread overview]
Message-ID: <20160513072720.GG23271@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <1463087196-11688-5-git-send-email-John.C.Harrison@Intel.com>

On Thu, May 12, 2016 at 10:06:34PM +0100, John.C.Harrison@Intel.com wrote:
> +void i915_gem_request_notify(struct intel_engine_cs *engine, bool fence_locked)
> +{
> +	struct drm_i915_gem_request *req, *req_next;
> +	unsigned long flags;
>  	u32 seqno;
>  
> -	seqno = req->engine->get_seqno(req->engine);
> +	if (list_empty(&engine->fence_signal_list))
> +		return;
> +
> +	if (!fence_locked)
> +		spin_lock_irqsave(&engine->fence_lock, flags);
> +
> +	if (engine->irq_seqno_barrier)
> +		engine->irq_seqno_barrier(engine);
> +	seqno = engine->get_seqno(engine);
> +
> +	list_for_each_entry_safe(req, req_next, &engine->fence_signal_list, signal_link) {

NO, NO, NO. As we said the very first time, you cannot do this from an
irq handler.

The current code is already bad enough, this is making it large constant
+ N times worse. Please do look at how to do signal driven fences in O(1)
that I posted many months ago and several times since.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-05-13  7:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12 21:06 [PATCH v8 0/6] Convert requests to use struct fence John.C.Harrison
2016-05-12 21:06 ` [PATCH v8 1/6] drm/i915: Add per context timelines to fence object John.C.Harrison
2016-05-13  7:39   ` Chris Wilson
2016-05-13  9:16     ` John Harrison
2016-05-18 12:22       ` Maarten Lankhorst
2016-05-18 12:49         ` John Harrison
2016-05-18 13:20           ` Maarten Lankhorst
2016-05-12 21:06 ` [PATCH v8 2/6] drm/i915: Convert requests to use struct fence John.C.Harrison
2016-05-12 21:06 ` [PATCH v8 3/6] drm/i915: Removed now redundant parameter to i915_gem_request_completed() John.C.Harrison
2016-05-12 21:06 ` [PATCH v8 4/6] drm/i915: Interrupt driven fences John.C.Harrison
2016-05-13  7:27   ` Chris Wilson [this message]
2016-05-13  9:19     ` John Harrison
2016-05-19  9:47       ` Chris Wilson
2016-05-19  9:24   ` Maarten Lankhorst
2016-05-12 21:06 ` [PATCH v8 5/6] drm/i915: Updated request structure tracing John.C.Harrison
2016-05-12 21:06 ` [PATCH v8 6/6] drm/i915: Cache last IRQ seqno to reduce IRQ overhead John.C.Harrison
2016-05-13  7:41   ` Chris Wilson
2016-05-12 21:10 ` ✗ Ro.CI.BAT: failure for Convert requests to use struct fence (rev5) Patchwork
2016-05-13  7:44 ` [PATCH v8 0/6] Convert requests to use struct fence Chris Wilson
2016-05-13 10:11   ` John Harrison

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=20160513072720.GG23271@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=Intel-GFX@Lists.FreeDesktop.Org \
    --cc=John.C.Harrison@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.