All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915: Initialise the obj->rcu head
Date: Fri, 09 Nov 2018 10:40:56 +0200	[thread overview]
Message-ID: <87ftwahcdj.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20181108092101.27598-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.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108691
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_gem.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 5b80b0c14aed..24f126ccf21e 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);
> @@ -4941,6 +4943,8 @@ static void __i915_gem_free_objects(struct drm_i915_private *i915,
>  		drm_gem_object_release(&obj->base);
>  		i915_gem_info_remove_obj(i915, obj->base.size);
>  
> +		destroy_rcu_head(&obj->rcu);
> +

It looks like you need to break the union in struct drm_i915_gem_object
for this to work. Or did I get the ordering of events wrong?
-Mika

>  		kfree(obj->bit_17);
>  		i915_gem_object_free(obj);
>  
> -- 
> 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

  parent reply	other threads:[~2018-11-09  8:41 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 ` Mika Kuoppala [this message]
2018-11-09  9:00   ` [PATCH 1/2] " Chris Wilson
2018-11-09  9:03 ` [PATCH] " Chris Wilson
2018-11-09 10:32   ` Mika Kuoppala
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=87ftwahcdj.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.