mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Stanner <phasta@mailbox.org>
To: "Philipp Stanner" <phasta@kernel.org>,
	"Matthew Brost" <matthew.brost@intel.com>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Christian König" <ckoenig.leichtzumerken@gmail.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Sumit Semwal" <sumit.semwal@linaro.org>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	 linux-media@vger.kernel.org
Subject: Re: [PATCH v2 2/2] drm/sched: Protect entity->last_scheduled with spinlock
Date: Thu, 13 Aug 2026 12:13:10 +0200	[thread overview]
Message-ID: <ee5e9d04d45080b6d4189e9b6f5357d07cd77782.camel@mailbox.org> (raw)
In-Reply-To: <20260813092510.2385962-6-phasta@kernel.org>

On Thu, 2026-08-13 at 11:25 +0200, Philipp Stanner wrote:
> 
> +	drm_sched_rq_pop_entity(entity);
> +	spin_unlock(&entity->lock);
>  
>  	spsc_queue_pop(&entity->job_queue);
>  
> -	spin_lock(&entity->lock);
> -	drm_sched_rq_pop_entity(entity);
> -	spin_unlock(&entity->lock);
> +	dma_fence_put(prev_last_scheduled);


The relative order between these must not be changed. My bad.

So unfortunately it looks as if at least locking spsc_queue here is
necessary. I really wished someone could pick up our spsc_queue locking
TODO.


P.

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13  9:25 [PATCH v2 0/2] drm/sched: Introduce more locking to entity Philipp Stanner
2026-08-13  9:25 ` [PATCH v2 1/2] drm/sched: Lock drm_sched_rq_pop_entity() externally Philipp Stanner
2026-08-13  9:25 ` [PATCH v2 2/2] drm/sched: Protect entity->last_scheduled with spinlock Philipp Stanner
2026-08-13 10:13   ` Philipp Stanner [this message]

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=ee5e9d04d45080b6d4189e9b6f5357d07cd77782.camel@mailbox.org \
    --to=phasta@mailbox.org \
    --cc=airlied@gmail.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthew.brost@intel.com \
    --cc=mripard@kernel.org \
    --cc=phasta@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=sumit.semwal@linaro.org \
    --cc=tzimmermann@suse.de \
    /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®