dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Philipp Stanner <phasta@mailbox.org>
To: "Maíra Canal" <mcanal@igalia.com>,
	"Tomeu Vizoso" <tomeu@tomeuvizoso.net>,
	"Oded Gabbay" <ogabbay@kernel.org>,
	"Christian König" <christian.koenig@amd.com>,
	"Christian König" <ckoenig.leichtzumerken@gmail.com>,
	"Rob Herring" <robh@kernel.org>,
	"Matthew Brost" <matthew.brost@intel.com>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Philipp Stanner" <phasta@kernel.org>,
	"Sumit Semwal" <sumit.semwal@linaro.org>
Cc: kernel-dev@igalia.com, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm/rocket: Drop the dedicated reset workqueue
Date: Mon, 08 Jun 2026 12:08:45 +0200	[thread overview]
Message-ID: <28fa48b63a6968999e40ff718ce06473e5baeb7c.camel@mailbox.org> (raw)
In-Reply-To: <20260605-rocket-per-task-jobs-v1-3-e3319adf3c49@igalia.com>

On Fri, 2026-06-05 at 13:07 -0300, Maíra Canal wrote:
> Each core allocated an ordered workqueue ("rocket-reset-%d") and passed
> it as the scheduler's timeout_wq. The only documented reason to provide a
> custom timeout_wq is to serialize the timeout handlers of several
> schedulers that share globally-reset hardware.
> 

I think it's mostly about serializing timeouts for hardware where one
ring blocking can cause another ring to delay. So it's about catching
false-positive timeouts for certain rings.

>  That does not apply here:
> each core has its own scheduler and is reset independently
> (rocket_reset() only touches its own core). With the reset worker gone,
> the workqueue served solely as the timeout_wq.
> 
> Drop it and let drm_sched fall back to the default timeout workqueue.

From what I can tell, much of the cleanup, especially this part, looks
quite non-controversial.


P.

> 
> Signed-off-by: Maíra Canal <mcanal@igalia.com>
> ---
>  drivers/accel/rocket/rocket_core.h |  4 ----
>  drivers/accel/rocket/rocket_job.c  | 15 +--------------
>  2 files changed, 1 insertion(+), 18 deletions(-)
> 
> diff --git a/drivers/accel/rocket/rocket_core.h b/drivers/accel/rocket/rocket_core.h
> index f74dc99d07bb..607e4270f59c 100644
> --- a/drivers/accel/rocket/rocket_core.h
> +++ b/drivers/accel/rocket/rocket_core.h
> @@ -46,10 +46,6 @@ struct rocket_core {
>  
>  	spinlock_t fence_lock;
>  
> -	struct {
> -		struct workqueue_struct *wq;
> -	} reset;
> -
>  	struct drm_gpu_scheduler sched;
>  	u64 fence_context;
>  	u64 emit_seqno;
> diff --git a/drivers/accel/rocket/rocket_job.c b/drivers/accel/rocket/rocket_job.c
> index 871041eb7a1d..1a454559ecf4 100644
> --- a/drivers/accel/rocket/rocket_job.c
> +++ b/drivers/accel/rocket/rocket_job.c
> @@ -467,33 +467,20 @@ int rocket_job_init(struct rocket_core *core)
>  		return ret;
>  	}
>  
> -	core->reset.wq = alloc_ordered_workqueue("rocket-reset-%d", 0, core->index);
> -	if (!core->reset.wq)
> -		return -ENOMEM;
> -
>  	core->fence_context = dma_fence_context_alloc(1);
>  
> -	args.timeout_wq = core->reset.wq;
>  	ret = drm_sched_init(&core->sched, &args);
>  	if (ret) {
>  		dev_err(core->dev, "Failed to create scheduler: %d.", ret);
> -		goto err_sched;
> +		return ret;
>  	}
>  
>  	return 0;
> -
> -err_sched:
> -	drm_sched_fini(&core->sched);
> -
> -	destroy_workqueue(core->reset.wq);
> -	return ret;
>  }
>  
>  void rocket_job_fini(struct rocket_core *core)
>  {
>  	drm_sched_fini(&core->sched);
> -
> -	destroy_workqueue(core->reset.wq);
>  }
>  
>  int rocket_job_open(struct rocket_file_priv *rocket_priv)

  parent reply	other threads:[~2026-06-08 10:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-05 16:06 [PATCH 0/3] drm/rocket: Stop submitting hardware work from the IRQ handler Maíra Canal
2026-06-05 16:06 ` [PATCH 1/3] drm/rocket: Remove unused reset worker Maíra Canal
2026-06-05 16:25   ` sashiko-bot
2026-06-05 16:06 ` [PATCH 2/3] drm/rocket: Submit one drm_sched_job per task Maíra Canal
2026-06-05 16:20   ` sashiko-bot
2026-06-08 10:02   ` Philipp Stanner
2026-06-05 16:07 ` [PATCH 3/3] drm/rocket: Drop the dedicated reset workqueue Maíra Canal
2026-06-05 18:20   ` sashiko-bot
2026-06-08 10:08   ` Philipp Stanner [this message]
2026-06-05 16:40 ` [RFC PATCH 0/3] drm/rocket: Stop submitting hardware work from the IRQ handler Maíra Canal

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=28fa48b63a6968999e40ff718ce06473e5baeb7c.camel@mailbox.org \
    --to=phasta@mailbox.org \
    --cc=christian.koenig@amd.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-dev@igalia.com \
    --cc=matthew.brost@intel.com \
    --cc=mcanal@igalia.com \
    --cc=ogabbay@kernel.org \
    --cc=phasta@kernel.org \
    --cc=robh@kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=tomeu@tomeuvizoso.net \
    /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