From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Maarten Lankhorst <dev@lankhorst.se>
Cc: <intel-gfx@lists.freedesktop.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [PATCH 4/4] drm/i915: Consider RCU read section as atomic.
Date: Tue, 15 Jul 2025 15:08:46 -0400 [thread overview]
Message-ID: <aHanPlftvW2RShXR@intel.com> (raw)
In-Reply-To: <20250715154125.27813-10-dev@lankhorst.se>
On Tue, Jul 15, 2025 at 05:41:30PM +0200, Maarten Lankhorst wrote:
> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>
> Locking and/ or running inside interrupt handler will not lead to an
> atomic section on PREEMPT_RT. The RCU read section needs to be
> considered because all locks, which become sleeping locks on
> PREEMPT_RT, start a RCU read section. Scheduling/ sleeping while within
> a RCU read section is invalid.
>
> Check for also for RCU read section in stop_timeout() to determine if it
> is safe to sleep.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Link: https://lore.kernel.org/r/20250714153954.629393-9-bigeasy@linutronix.de
> Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> index b721bbd233567..f5a6143ea8a24 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> @@ -1609,7 +1609,7 @@ u64 intel_engine_get_last_batch_head(const struct intel_engine_cs *engine)
>
> static unsigned long stop_timeout(const struct intel_engine_cs *engine)
> {
> - if (in_atomic() || irqs_disabled()) /* inside atomic preempt-reset? */
> + if (in_atomic() || irqs_disabled() || rcu_preempt_depth()) /* inside atomic preempt-reset? */
> return 0;
>
> /*
> --
> 2.45.2
>
next prev parent reply other threads:[~2025-07-15 19:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 15:41 [PATCH 0/4] CI test the -gt-next patches Maarten Lankhorst
2025-07-15 15:41 ` [PATCH 1/4] drm/i915/gt: Use spin_lock_irq() instead of local_irq_disable() + spin_lock() Maarten Lankhorst
2025-07-15 15:41 ` [PATCH 2/4] drm/i915: Drop the irqs_disabled() check Maarten Lankhorst
2025-07-15 19:08 ` Rodrigo Vivi
2025-07-15 15:41 ` [PATCH 3/4] drm/i915/guc: Consider also RCU depth in busy loop Maarten Lankhorst
2025-07-15 15:41 ` [PATCH 4/4] drm/i915: Consider RCU read section as atomic Maarten Lankhorst
2025-07-15 19:08 ` Rodrigo Vivi [this message]
2025-07-15 21:22 ` ✗ i915.CI.BAT: failure for CI test the -gt-next patches Patchwork
2025-07-16 9:29 ` ✓ i915.CI.BAT: success for CI test the -gt-next patches. (rev2) Patchwork
2025-07-16 23:23 ` ✗ i915.CI.Full: failure " 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=aHanPlftvW2RShXR@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=bigeasy@linutronix.de \
--cc=dev@lankhorst.se \
--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.