From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Initialise the obj->rcu head
Date: Fri, 09 Nov 2018 12:32:30 +0200 [thread overview]
Message-ID: <87d0reh77l.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20181109090311.15321-1-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Make the rcu_head known to the system, in particular for debugobjects.
> And having declared it for debugobjects, we need to tidy up afterwards.
>
> v2: mark the obj->rcu as being destroy when we reuse its location for
> the freed list.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108691
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index dc120b5d8e05..1c9a41ea6834 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4739,6 +4739,8 @@ void i915_gem_object_init(struct drm_i915_gem_object *obj,
> INIT_LIST_HEAD(&obj->lut_list);
> INIT_LIST_HEAD(&obj->batch_pool_link);
>
> + init_rcu_head(&obj->rcu);
> +
> obj->ops = ops;
>
> reservation_object_init(&obj->__builtin_resv);
> @@ -5005,6 +5007,13 @@ static void __i915_gem_free_object_rcu(struct rcu_head *head)
> container_of(head, typeof(*obj), rcu);
> struct drm_i915_private *i915 = to_i915(obj->base.dev);
>
> + /*
> + * We reuse obj->rcu for the freed list, so we had better not treat
> + * is like a rcu_head from this point forwards. And we expect all
> + * objects to be freed via this path.
> + */
> + destroy_rcu_head(&obj->rcu);
> +
> /*
> * Since we require blocking on struct_mutex to unbind the freed
> * object from the GPU before releasing resources back to the
> --
> 2.19.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-11-09 10:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-08 9:21 [PATCH 1/2] drm/i915: Initialise the obj->rcu head Chris Wilson
2018-11-08 9:21 ` [PATCH 2/2] drm/i915: Track rcu_head for our idle worker Chris Wilson
2018-11-09 11:25 ` Mika Kuoppala
2018-11-08 10:01 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Initialise the obj->rcu head Patchwork
2018-11-09 8:40 ` [PATCH 1/2] " Mika Kuoppala
2018-11-09 9:00 ` Chris Wilson
2018-11-09 9:03 ` [PATCH] " Chris Wilson
2018-11-09 10:32 ` Mika Kuoppala [this message]
2018-11-09 10:49 ` Chris Wilson
2018-11-09 9:47 ` ✓ Fi.CI.BAT: success for series starting with drm/i915: Initialise the obj->rcu head (rev2) Patchwork
2018-11-09 13:51 ` ✓ Fi.CI.IGT: " 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=87d0reh77l.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.