From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 01/28] drm/i915: Move fence register tracking from i915->mm to ggtt
Date: Mon, 10 Jun 2019 14:44:58 +0300 [thread overview]
Message-ID: <87h88xaclh.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <156016407948.2149.4614829501752768729@skylake-alporthouse-com>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Quoting Mika Kuoppala (2019-06-10 10:46:43)
>> Chris Wilson <chris@chris-wilson.co.uk> writes:
>> > static int i915_gem_fence_regs_info(struct seq_file *m, void *data)
>> > {
>> > - struct drm_i915_private *dev_priv = node_to_i915(m->private);
>> > - struct drm_device *dev = &dev_priv->drm;
>> > - int i, ret;
>> > + struct drm_i915_private *i915 = node_to_i915(m->private);
>> > + unsigned int i;
>> >
>> > - ret = mutex_lock_interruptible(&dev->struct_mutex);
>> > - if (ret)
>> > - return ret;
>> > + seq_printf(m, "Total fences = %d\n", i915->ggtt.num_fences);
>> >
>> > - seq_printf(m, "Total fences = %d\n", dev_priv->num_fence_regs);
>> > - for (i = 0; i < dev_priv->num_fence_regs; i++) {
>> > - struct i915_vma *vma = dev_priv->fence_regs[i].vma;
>> > + rcu_read_lock();
>>
>> This does not seem to be for reset. So it must be for keeping
>> the object alive.
>
> Correct.
>
>> What guarantees that the obj is kept alive over this rcu
>> lock?
>
> That the object is RCU protected. :-p
>
> It is a relatively simple one (it used to be manual RCU barriers),
> i915_gem_free_object() uses call_rcu() to only queue the object for
> freeing after an RCU grace period has elapsed.
I was grepping for synchronize_rcu and ended up confused. This
is what I was looking for.
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-06-10 11:45 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-10 7:20 [RFC] Removing struct_mutex from around requests Chris Wilson
2019-06-10 7:20 ` [PATCH 01/28] drm/i915: Move fence register tracking from i915->mm to ggtt Chris Wilson
2019-06-10 9:46 ` Mika Kuoppala
2019-06-10 10:54 ` Chris Wilson
2019-06-10 11:44 ` Mika Kuoppala [this message]
2019-06-10 7:21 ` [PATCH 02/28] drm/i915: Track ggtt fence reservations under its own mutex Chris Wilson
2019-06-10 7:21 ` [PATCH 03/28] drm/i915: Combine unbound/bound list tracking for objects Chris Wilson
2019-06-10 11:01 ` Matthew Auld
2019-06-10 11:06 ` Chris Wilson
2019-06-10 7:21 ` [PATCH 04/28] drm/i915: Promote i915->mm.obj_lock to be irqsafe Chris Wilson
2019-06-10 9:44 ` Matthew Auld
2019-06-10 7:21 ` [PATCH 05/28] drm/i915: Make the semaphore saturation mask global Chris Wilson
2019-06-10 7:21 ` [PATCH 06/28] drm/i915: Keep contexts pinned until after the next kernel context switch Chris Wilson
2019-06-10 7:21 ` [PATCH 07/28] drm/i915: Stop retiring along engine Chris Wilson
2019-06-10 7:21 ` [PATCH 08/28] drm/i915: Replace engine->timeline with a plain list Chris Wilson
2019-06-10 7:21 ` [PATCH 09/28] drm/i915: Flush the execution-callbacks on retiring Chris Wilson
2019-06-10 7:21 ` [PATCH 10/28] drm/i915/execlists: Preempt-to-busy Chris Wilson
2019-06-10 7:21 ` [PATCH 11/28] drm/i915/execlists: Minimalistic timeslicing Chris Wilson
2019-06-10 7:21 ` [PATCH 12/28] drm/i915/execlists: Force preemption Chris Wilson
2019-06-10 7:21 ` [PATCH 13/28] drm/i915: Use forced preemptions in preference over hangcheck Chris Wilson
2019-06-10 7:21 ` [PATCH 14/28] drm/i915: Add a label for config DRM_I915_SPIN_REQUEST Chris Wilson
2019-06-10 12:11 ` Mika Kuoppala
2019-06-10 7:21 ` [PATCH 15/28] drm/i915: Throw away the active object retirement complexity Chris Wilson
2019-06-10 7:21 ` [PATCH 16/28] drm/i915: Provide an i915_active.acquire callback Chris Wilson
2019-06-10 7:21 ` [PATCH 17/28] drm/i915: Push the i915_active.retire into a worker Chris Wilson
2019-06-10 7:21 ` [PATCH 18/28] drm/i915/overlay: Switch to using i915_active tracking Chris Wilson
2019-06-10 7:21 ` [PATCH 19/28] drm/i915: Forgo last_fence active request tracking Chris Wilson
2019-06-10 7:21 ` [PATCH 20/28] drm/i915: Extract intel_frontbuffer active tracking Chris Wilson
2019-06-10 7:21 ` [PATCH 21/28] drm/i915: Coordinate i915_active with its own mutex Chris Wilson
2019-06-10 7:21 ` [PATCH 22/28] drm/i915: Only track bound elements of the GTT Chris Wilson
2019-06-10 7:21 ` [PATCH 23/28] drm/i915: Propagate fence errors Chris Wilson
2019-06-10 7:21 ` [PATCH 24/28] drm/i915: Allow page pinning to be in the background Chris Wilson
2019-06-10 7:21 ` [PATCH 25/28] drm/i915: Pull kref into i915_address_space Chris Wilson
2019-06-10 7:21 ` [PATCH 26/28] drm/i915: Rename i915_hw_ppgtt to i915_ppgtt Chris Wilson
2019-06-10 7:21 ` [PATCH 27/28] drm/i915: Allow vma binding to occur asynchronously Chris Wilson
2019-06-10 17:34 ` Matthew Auld
2019-06-10 19:51 ` Chris Wilson
2019-06-10 7:21 ` [PATCH 28/28] drm/i915: Use vm->mutex for serialising GTT insertion Chris Wilson
2019-06-10 11:34 ` ✗ Fi.CI.BAT: failure for series starting with [01/28] drm/i915: Move fence register tracking from i915->mm to ggtt 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=87h88xaclh.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@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 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.