From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Maarten Lankhorst <dev@lankhorst.se>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
linux-rt-devel@lists.linux.dev, dri-devel@lists.freedesktop.org
Subject: Re: [i915-rt v6 00/24] drm/i915/display: All patches to make PREEMPT_RT work on i915 + xe.
Date: Tue, 24 Feb 2026 17:27:03 +0100 [thread overview]
Message-ID: <20260224162703.Q_taYjEC@linutronix.de> (raw)
In-Reply-To: <20260220083657.28815-26-dev@lankhorst.se>
On 2026-02-20 09:36:58 [+0100], Maarten Lankhorst wrote:
> New version, new approach!
>
> A lot of the problems with PREEMPT_RT happen because of the current vblank
> handling. The real solution is making it more deterministic.
>
…
I applied this on top of drm-tip because nothing else I had around
applied cleanly. I had to tell the selftests to use
dma_fence_lock_irqsave() instead of spin_lock_irq() but I guess you are
aware of it.
I've been using it a bit and haven't noticed any big spikes while doing
this and that. The help message for CONFIG_DRM_I915_SELFTEST refers to
i915.selftest but this seems to have been replaced by
{mock|live|perf}_selftests. Using mock_selftest I get
| i915: Running i915_sw_fence_mock_selftests/test_timer
| BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48
| in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 4667, name: modprobe
| preempt_count: 1, expected: 0
| RCU nest depth: 0, expected: 0
| 1 lock held by modprobe/4667:
| #0: ffffd06703d0ba58 (&tf->fence/1){+.+.}-{2:2}, at: __i915_sw_fence_wake_up_all+0x122/0x1d0 [i915]
| Preemption disabled at:
| [<ffffffffc1a1990e>] test_timer+0x2e/0x230 [i915]
^
| CPU: 2 UID: 0 PID: 4667 Comm: modprobe Tainted: G U 7.0.0-rc1+ #1 PREEMPT_{RT,(lazy)}
| Tainted: [U]=USER
| Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./Z68 Pro3-M, BIOS P2.30 06/29/2012
| Call Trace:
| <TASK>
| dump_stack_lvl+0x68/0x90
| __might_resched.cold+0xf0/0x12b
| rt_spin_lock_nested+0x5d/0x200
| __i915_sw_fence_wake_up_all+0x122/0x1d0 [i915]
| i915_sw_fence_complete+0x3e/0x60 [i915]
| test_timer+0x42/0x230 [i915]
^ has a preempt_disable()
| __i915_subtests.cold+0x22/0x71 [i915]
| __run_selftests.cold+0x89/0xb8 [i915]
| i915_mock_selftests+0x30/0x70 [i915]
| i915_init+0x22/0x80 [i915]
|
| i915: Running i915_sw_fence_mock_selftests/test_dma_fence
| Asynchronous wait on fence mock:mock:0 timed out (hint:fence_notify [i915])
| BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48
| in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 86, name: ktimers/7
| preempt_count: 0, expected: 0
| RCU nest depth: 2, expected: 2
| 6 locks held by ktimers/7/86:
| #0: ffffffff8f881700 (local_bh){.+.+}-{1:2}, at: __local_bh_disable_ip+0x23/0x230
| #1: ffffffff8f909440 (rcu_read_lock){....}-{1:2}, at: __local_bh_disable_ip+0x124/0x230
| #2: ffff8acf9751fce0 (&base->expiry_lock){+...}-{2:2}, at: timer_expire_remote+0x37/0x60
| #3: ffffffff8f909440 (rcu_read_lock){....}-{1:2}, at: rt_spin_lock+0xf6/0x200
| #4: ffffd0670031fc58 ((&timer->timer)){....}-{0:0}, at: call_timer_fn+0x7e/0x280
| #5: ffff8acf857eb7d8 (fence/1){+.+.}-{2:2}, at: __i915_sw_fence_wake_up_all+0x122/0x1d0 [i915]
| irq event stamp: 729273
| hardirqs last enabled at (729272): [<ffffffff8f0df4dc>] _raw_spin_unlock_irqrestore+0x4c/0x70
| hardirqs last disabled at (729273): [<ffffffff8f0df162>] _raw_spin_lock_irq+0x52/0x60
I guess this could be improved…
| softirqs last enabled at (729252): [<ffffffff8e50da42>] run_ktimerd+0x72/0xb0
| softirqs last disabled at (729256): [<ffffffff8e50d9db>] run_ktimerd+0xb/0xb0
| CPU: 7 UID: 0 PID: 86 Comm: ktimers/7 Tainted: G U W 7.0.0-rc1+ #1 PREEMPT_{RT,(lazy)}
| Tainted: [U]=USER, [W]=WARN
| Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./Z68 Pro3-M, BIOS P2.30 06/29/2012
| Call Trace:
| <TASK>
| dump_stack_lvl+0x68/0x90
| __might_resched.cold+0xf0/0x12b
| rt_spin_lock_nested+0x5d/0x200
| __i915_sw_fence_wake_up_all+0x122/0x1d0 [i915]
| i915_sw_fence_complete+0x3e/0x60 [i915]
| call_timer_fn+0xaa/0x280
| __run_timers+0x1e8/0x340
| timer_expire_remote+0x47/0x60
| tmigr_handle_remote+0x381/0x500
| handle_softirqs.isra.0+0xc0/0x3f0
| run_ktimerd+0x50/0xb0
| smpboot_thread_fn+0x12d/0x2e0
| i915: Running scatterlist
| i915: Running scatterlist_mock_selftests/igt_sg_alloc
| sg_alloc_table timed out
| i915: Running scatterlist_mock_selftests/igt_sg_trim
| i915_sg_trim timed out
…
There is nothing else, that popped up. So far no objections from my side
;) Thank you.
Sebastian
next prev parent reply other threads:[~2026-02-24 16:27 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-20 8:36 [i915-rt v6 00/24] drm/i915/display: All patches to make PREEMPT_RT work on i915 + xe Maarten Lankhorst
2026-02-20 8:36 ` [i915-rt v6 01/24] drm/vblank_work: Add methods to schedule vblank_work in 2 stages Maarten Lankhorst
2026-02-20 12:24 ` [i915-rt v6.1 1/1] " Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 02/24] drm/vblank: Add a 2-stage version of drm_crtc_arm_vblank_event Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 03/24] drm/intel/display: Make intel_crtc_arm_vblank_event static Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 04/24] drm/intel/display: Convert vblank event handling to 2-stage arming Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 05/24] drm/i915/display: Move vblank put until after critical section Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 06/24] drm/i915/display: Remove locking from intel_vblank_evade " Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 07/24] drm/i915/display: Handle vlv dsi workaround in scanline_in_safe_range too Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 08/24] drm/i915: Use preempt_disable/enable_rt() where recommended Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 09/24] drm/i915/display: Make get_vblank_counter use intel_de_read_fw() Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 10/24] drm/i915/display: Do not take uncore lock in i915_get_vblank_counter Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 11/24] drm/i915/display: Make icl_dsi_frame_update use _fw too Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 12/24] drm/i915/display: Use intel_de_read/write_fw in colorops Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 13/24] drm/i915/display: Use intel_de_write_fw in intel_pipe_fastset Maarten Lankhorst
2026-02-25 9:25 ` Jani Nikula
2026-02-25 11:59 ` Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 14/24] drm/i915/display: Make set_pipeconf use the fw variants Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 15/24] drm/i915/display: Fix intel_lpe_audio_irq_handler for PREEMPT-RT Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 16/24] drm/i915/gt: Use spin_lock_irq() instead of local_irq_disable() + spin_lock() Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 17/24] drm/i915: Drop the irqs_disabled() check Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 18/24] drm/i915/guc: Consider also RCU depth in busy loop Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 19/24] drm/i915/gt: Fix selftests on PREEMPT_RT Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 20/24] drm/i915/gt: Set stop_timeout() correctly on PREEMPT-RT Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 21/24] drm/i915/display: Remove uncore lock from vlv_atomic_update_fifo Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 22/24] Revert "drm/i915: Depend on !PREEMPT_RT." Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 23/24] PREEMPT_RT injection Maarten Lankhorst
2026-02-20 8:37 ` [i915-rt v6 24/24] FOR-CI: bump MAX_STACK_TRACE_ENTRIES Maarten Lankhorst
2026-02-24 14:15 ` Sebastian Andrzej Siewior
2026-02-25 12:32 ` Maarten Lankhorst
2026-02-24 16:27 ` Sebastian Andrzej Siewior [this message]
2026-02-24 16:59 ` [i915-rt v6 00/24] drm/i915/display: All patches to make PREEMPT_RT work on i915 + xe Sebastian Andrzej Siewior
2026-02-25 7:58 ` Sebastian Andrzej Siewior
2026-02-25 12:15 ` Maarten Lankhorst
2026-02-25 20:06 ` Maarten Lankhorst
2026-02-26 12:07 ` Sebastian Andrzej Siewior
2026-02-26 14:19 ` Sebastian Andrzej Siewior
2026-02-26 14:38 ` Sebastian Andrzej Siewior
2026-03-05 10:19 ` Maarten Lankhorst
2026-03-05 10:42 ` Maarten Lankhorst
2026-03-05 10:50 ` Sebastian Andrzej Siewior
2026-03-05 11:11 ` Maarten Lankhorst
2026-03-05 11:19 ` Sebastian Andrzej Siewior
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=20260224162703.Q_taYjEC@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=dev@lankhorst.se \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-rt-devel@lists.linux.dev \
/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