Hey,

Correct, this should be in the commit message, let me update it.

On 7/9/26 12:36, Sebastian Andrzej Siewior wrote:
> On 2026-07-06 13:48:20 [+0200], Maarten Lankhorst wrote:
>> Signed-off-by: Maarten Lankhorst <[email protected]>
>> ---
>>  drivers/gpu/drm/i915/gt/selftest_engine_pm.c | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/gt/selftest_engine_pm.c 
>> b/drivers/gpu/drm/i915/gt/selftest_engine_pm.c
>> index 10e556a7eac45..c1eff9edd8a5e 100644
>> --- a/drivers/gpu/drm/i915/gt/selftest_engine_pm.c
>> +++ b/drivers/gpu/drm/i915/gt/selftest_engine_pm.c
>> @@ -277,11 +277,11 @@ static int live_engine_busy_stats(void *arg)
>>              st_engine_heartbeat_disable(engine);
>>  
>>              ENGINE_TRACE(engine, "measuring idle time\n");
>> -            preempt_disable();
>> +            migrate_disable();
>>              de = intel_engine_get_busy_time(engine, &t[0]);
> 
> this change has been made probably due to guc_engine_busyness(). Looking
> at execlists_engine_busyness() then there is a seqcount_t and the writer
> side does local_irq_disable() during the update so this should work.
> The comment says the writer is serialized but I don't see how (maybe
> there is just one). So…
> 
> Sebastian
Would the below look good?

The engine->busyness() callbacks called from the selftests are on PREEMPT_RT
not safe with preemption disabled, because all spinlocks are converted to
rt-mutexes.

This is also a problem for perf events, where we have to disable
the busyness events on PREEMPT_RT.

Previous attempts to fix this failed, so convert the selftest code to read
engine->busyness()  with migrate_disable() instead of preempt_disable() to
prevent selftest failures on PREEMPT_RT.

Reply via email to