All of lore.kernel.org
 help / color / mirror / Atom feed
From: Danilo Krummrich <dakr@kernel.org>
To: "Christian König" <christian.koenig@amd.com>
Cc: phasta@kernel.org, Tvrtko Ursulin <tvrtko.ursulin@igalia.com>,
	amd-gfx@lists.freedesktop.org, kernel-dev@igalia.com,
	Matthew Brost <matthew.brost@intel.com>
Subject: Re: [PATCH 1/4] drm/scheduler: Add drm_sched_cancel_all_jobs helper
Date: Thu, 6 Feb 2025 15:25:07 +0100	[thread overview]
Message-ID: <Z6TGQ2Bjy6fqAHXw@cassiopeiae> (raw)
In-Reply-To: <744abfb3-9edf-4ebb-b657-b811ef156001@amd.com>

On Thu, Feb 06, 2025 at 02:46:40PM +0100, Christian König wrote:
> Am 06.02.25 um 14:35 schrieb Philipp Stanner:
> > On Wed, 2025-02-05 at 15:33 +0000, Tvrtko Ursulin wrote:
> > > The helper copies code from the existing
> > > amdgpu_job_stop_all_jobs_on_sched
> > > with the purpose of reducing the amount of driver code which directly
> > > touch scheduler internals.
> > > 
> > > If or when amdgpu manages to change the approach for handling the
> > > permanently wedged state this helper can be removed.
> > Have you checked how many other drivers might need such a helper?
> > 
> > I have a bit mixed feelings about this, because, AFAICT, in the past
> > helpers have been added for just 1 driver, such as
> > drm_sched_wqueue_ready(), and then they have stayed for almost a
> > decade.
> > 
> > AFAIU this is just code move, and only really "decouples" amdgpu in the
> > sense of having an official scheduler function that does what amdgpu
> > used to do.
> > 
> > So my tendency here would be to continue "allowing" amdgpu to touch the
> > scheduler internals until amdgpu fixes this "permanently wedged
> > state". And if that's too difficult, couldn't the helper reside in a
> > amdgpu/sched_helpers.c or similar?
> > 
> > I think that's better than adding 1 helper for just 1 driver and then
> > supposedly removing it again in the future.
> 
> Yeah, agree to that general approach.
> 
> What amdgpu does here is kind of nasty and looks unnecessary, but changing
> it means we need time from Hawkings and his people involved on RAS for
> amdgpu.
> 
> When we move the code to the scheduler we make it official scheduler
> interface to others to replicate and that is exactly what we should try to
> avoid.

It'd be even worse. It would mean that we create an example for drivers to be
"rewarded" with a free driver specific API by abusing the general API.

Clearly (also) a NACK from my end.

  parent reply	other threads:[~2025-02-06 14:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05 15:33 [PATCH v2 0/4] Decouple amdgpu from the scheduler, a bit Tvrtko Ursulin
2025-02-05 15:33 ` [PATCH 1/4] drm/scheduler: Add drm_sched_cancel_all_jobs helper Tvrtko Ursulin
2025-02-05 15:42   ` Christian König
2025-02-06 13:35   ` Philipp Stanner
2025-02-06 13:42     ` Tvrtko Ursulin
2025-02-06 13:46     ` Christian König
2025-02-06 13:53       ` Tvrtko Ursulin
2025-02-06 14:00         ` Philipp Stanner
2025-02-06 14:01         ` Christian König
2025-02-06 13:53       ` Philipp Stanner
2025-02-06 14:25       ` Danilo Krummrich [this message]
2025-02-06 15:04       ` Zhang, Hawking
2025-02-05 15:33 ` [PATCH 2/4] drm/amdgpu: Use " Tvrtko Ursulin
2025-02-05 15:33 ` [PATCH 3/4] drm/sched: Add internal job peek/pop API Tvrtko Ursulin
2025-02-06 13:39   ` Philipp Stanner
2025-02-05 15:33 ` [PATCH 4/4] drm/sched: Make the type of drm_sched_job->last_dependency consistent Tvrtko Ursulin

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=Z6TGQ2Bjy6fqAHXw@cassiopeiae \
    --to=dakr@kernel.org \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=kernel-dev@igalia.com \
    --cc=matthew.brost@intel.com \
    --cc=phasta@kernel.org \
    --cc=tvrtko.ursulin@igalia.com \
    /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.