From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: John.C.Harrison@Intel.com, Intel-GFX@Lists.FreeDesktop.Org
Subject: Re: [PATCH v7 5/8] drm/i915: Delay the freeing of requests until retire time
Date: Thu, 21 Apr 2016 09:41:17 +0200 [thread overview]
Message-ID: <5718841D.5050408@linux.intel.com> (raw)
In-Reply-To: <1461172195-3959-6-git-send-email-John.C.Harrison@Intel.com>
Op 20-04-16 om 19:09 schreef John.C.Harrison@Intel.com:
> From: John Harrison <John.C.Harrison@Intel.com>
>
> The request structure is reference counted. When the count reached
> zero, the request was immediately freed and all associated objects
> were unrefereced/unallocated. This meant that the driver mutex lock
> must be held at the point where the count reaches zero. This was fine
> while all references were held internally to the driver. However, the
> plan is to allow the underlying fence object (and hence the request
> itself) to be returned to other drivers and to userland. External
> users cannot be expected to acquire a driver private mutex lock.
>
> Rather than attempt to disentangle the request structure from the
> driver mutex lock, the decsion was to defer the free code until a
> later (safer) point. Hence this patch changes the unreference callback
> to merely move the request onto a delayed free list. The driver's
> retire worker thread will then process the list and actually call the
> free function on the requests.
>
> v2: New patch in series.
>
> v3: Updated after review comments by Tvrtko Ursulin. Rename list nodes
> to 'link' rather than 'list'. Update list processing to be more
> efficient/safer with respect to spinlocks.
>
> v4: Changed to use basic spinlocks rather than IRQ ones - missed
> update from earlier feedback by Tvrtko.
>
> v5: Improved a comment to keep the style checker happy.
>
> v7: Updated to newer nightly (lots of ring -> engine renaming). Also
> added a list_empty() check before wasting time with spinlocks and list
> processing.
>
> For: VIZ-5190
> Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 22 +++----------------
> drivers/gpu/drm/i915/i915_gem.c | 39 +++++++++++++++++++++++++++++----
> drivers/gpu/drm/i915/intel_display.c | 2 +-
> drivers/gpu/drm/i915/intel_lrc.c | 2 ++
> drivers/gpu/drm/i915/intel_pm.c | 2 +-
> drivers/gpu/drm/i915/intel_ringbuffer.c | 2 ++
> drivers/gpu/drm/i915/intel_ringbuffer.h | 7 ++++++
> 7 files changed, 51 insertions(+), 25 deletions(-)
>
This patch should go away entirely with the 'Premature unpinning at last' patch series, specifically
'[Intel-gfx] [PATCH 16/19] drm/i915: Move releasing of the GEM request from free to retire/cancel'.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-04-21 7:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-20 17:09 [PATCH v7 0/8] Convert requests to use struct fence John.C.Harrison
2016-04-20 17:09 ` [PATCH v7 1/8] drm/i915: " John.C.Harrison
2016-04-21 7:06 ` Maarten Lankhorst
2016-04-21 10:26 ` John Harrison
2016-04-21 11:12 ` Maarten Lankhorst
2016-04-21 7:09 ` Maarten Lankhorst
2016-04-20 17:09 ` [PATCH v7 2/8] drm/i915: Removed now redudant parameter to i915_gem_request_completed() John.C.Harrison
2016-04-21 7:19 ` Maarten Lankhorst
2016-04-21 10:18 ` John Harrison
2016-04-20 17:09 ` [PATCH v7 3/8] drm/i915: Add per context timelines to fence object John.C.Harrison
2016-04-20 17:44 ` Chris Wilson
2016-04-21 11:37 ` John Harrison
2016-04-20 17:09 ` [PATCH v7 4/8] drm/i915: Fix clean up of file client list on execbuff failure John.C.Harrison
2016-04-21 7:20 ` Maarten Lankhorst
2016-04-21 10:15 ` John Harrison
2016-04-20 17:09 ` [PATCH v7 5/8] drm/i915: Delay the freeing of requests until retire time John.C.Harrison
2016-04-21 7:41 ` Maarten Lankhorst [this message]
2016-04-20 17:09 ` [PATCH v7 6/8] drm/i915: Interrupt driven fences John.C.Harrison
2016-04-21 7:38 ` Maarten Lankhorst
2016-04-20 17:09 ` [PATCH v7 7/8] drm/i915: Updated request structure tracing John.C.Harrison
2016-04-20 17:09 ` [PATCH v7 8/8] drm/i915: Cache last IRQ seqno to reduce IRQ overhead John.C.Harrison
2016-04-22 15:37 ` [PATCH v7 0/8] Convert requests to use struct fence 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=5718841D.5050408@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--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.