mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Koenig, Christian" <Christian.Koenig@amd.com>
To: Eric Anholt <eric@anholt.net>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/sched: Always trace the dependencies we wait on, to fix a race.
Date: Fri, 7 Dec 2018 19:46:31 +0000	[thread overview]
Message-ID: <ba4a98f4-062e-0cb4-bd22-a0a191385f82@amd.com> (raw)
In-Reply-To: <20181207191653.30118-1-eric@anholt.net>

Am 07.12.18 um 20:16 schrieb Eric Anholt:
> The entity->dependency can go away completely once we've called
> drm_sched_entity_add_dependency_cb() (if the cb is called before we
> get around to tracing).  The tracepoint is more useful if we trace
> every dependency instead of just ones that get callbacks installed,
> anyway, so just do that.
>
> Fixes any easy-to-produce OOPS when tracing the scheduler on V3D with
> "perf record -a -e gpu_scheduler:.\* glxgears" and DEBUG_SLAB enabled.
>
> Signed-off-by: Eric Anholt <eric@anholt.net>

Reviewed-by: Christian König <christian.koenig@amd.com>

Going to pick that up for upstream and will add with a CC: stable.

Thanks,
Christian.

> ---
>   drivers/gpu/drm/scheduler/sched_entity.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c
> index 4463d3826ecb..e2942c9a11a7 100644
> --- a/drivers/gpu/drm/scheduler/sched_entity.c
> +++ b/drivers/gpu/drm/scheduler/sched_entity.c
> @@ -440,13 +440,10 @@ struct drm_sched_job *drm_sched_entity_pop_job(struct drm_sched_entity *entity)
>   
>   	while ((entity->dependency =
>   			sched->ops->dependency(sched_job, entity))) {
> +		trace_drm_sched_job_wait_dep(sched_job, entity->dependency);
>   
> -		if (drm_sched_entity_add_dependency_cb(entity)) {
> -
> -			trace_drm_sched_job_wait_dep(sched_job,
> -						     entity->dependency);
> +		if (drm_sched_entity_add_dependency_cb(entity))
>   			return NULL;
> -		}
>   	}
>   
>   	/* skip jobs from entity that marked guilty */


  reply	other threads:[~2018-12-07 19:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-07 19:16 Eric Anholt
2018-12-07 19:46 ` Koenig, Christian [this message]
2019-02-07 23:10   ` Eric Anholt

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=ba4a98f4-062e-0cb4-bd22-a0a191385f82@amd.com \
    --to=christian.koenig@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eric@anholt.net \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®