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 2/2] drm/i915: Track rcu_head for our idle worker
Date: Fri, 09 Nov 2018 13:25:49 +0200	[thread overview]
Message-ID: <87a7mih4qq.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20181108092101.27598-2-chris@chris-wilson.co.uk>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> While our little rcu worker might be able to be replaced now by the
> dedicated rcu_work, in the meantime we should mark up the rcu_head for
> correct debugobjects tracking.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

I got distracted on looking how the epoch works.

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 24f126ccf21e..5537f4030717 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3557,6 +3557,8 @@ static void __sleep_rcu(struct rcu_head *rcu)
>  	struct sleep_rcu_work *s = container_of(rcu, typeof(*s), rcu);
>  	struct drm_i915_private *i915 = s->i915;
>  
> +	destroy_rcu_head(&s->rcu);
> +
>  	if (same_epoch(i915, s->epoch)) {
>  		INIT_WORK(&s->work, __sleep_work);
>  		queue_work(i915->wq, &s->work);
> @@ -3673,6 +3675,7 @@ i915_gem_idle_work_handler(struct work_struct *work)
>  	if (same_epoch(dev_priv, epoch)) {
>  		struct sleep_rcu_work *s = kmalloc(sizeof(*s), GFP_KERNEL);
>  		if (s) {
> +			init_rcu_head(&s->rcu);
>  			s->i915 = dev_priv;
>  			s->epoch = epoch;
>  			call_rcu(&s->rcu, __sleep_rcu);
> -- 
> 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

  reply	other threads:[~2018-11-09 11:26 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 [this message]
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
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=87a7mih4qq.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.