[PATCH i-g-t v2] tests/intel/gem_exec_schedule: Update for MTL RCS/CCS w/a

John Harrison john.c.harrison at intel.com
Thu Jan 11 18:45:19 UTC 2024


On 1/11/2024 06:04, Kamil Konieczny wrote:
> Hi John.C.Harrison,
> On 2024-01-10 at 12:44:58 -0800, John.C.Harrison at Intel.com wrote:
>> From: johnharr <johnharr at invalid-email.com>
> -------------------------- ^^^^^^^^^^^^^^^^^
> Looks like an error, checkpatch.pl complains about this.
> imho it should be:
>
> From: John Harrison <John.C.Harrison at Intel.com>
I have no idea what is going on here! It seems to be doing that when I 
do a 'git format-patch' in my IGT tree. Any other tree I have gets the 
correct email. My gitconfig has the correct email (in multiple places). 
I don't understand why (or how) the IGT tree is broken!?


>
>> The RCS/CCS w/a means that if spinners are sent to both RCS and CCS
>> engines then the system is dead and requires a reset. Even
>> pre-emptible spinners cannot be pre-empted due to the nature of the
>> w/a. So, do not get into that situation.
>>
>> v2: Expand code comment (review feedback by Ashutosh)
>>
>> Signed-off-by: John Harrison <John.C.Harrison at Intel.com>
>> Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
>> ---
>>   tests/intel/gem_exec_schedule.c | 22 ++++++++++++++++++++++
>>   1 file changed, 22 insertions(+)
>>
>> diff --git a/tests/intel/gem_exec_schedule.c b/tests/intel/gem_exec_schedule.c
>> index 183ee1a214bb..61b1a32332b4 100644
>> --- a/tests/intel/gem_exec_schedule.c
>> +++ b/tests/intel/gem_exec_schedule.c
>> @@ -443,6 +443,22 @@
>>   
>>   IGT_TEST_DESCRIPTION("Check that we can control the order of execution");
>>   
>> +/*
>> + * The RCS/CCS workaround on MTL means that if spinners are sent to both RCS
>> + * and CCS engines concurrently then the system is effectively dead and will
>> + * require a reset of both engines to recover. Even pre-emptible spinners
>> + * cannot be pre-empted due to the nature of the w/a. The requests must run
>> + * to completion or be reset. And in the case of certain IGT tests, there is
>> + * no completion until after the pre-emption. The result being that the tests
>> + * get killed by the heartbeat and fail.
>> + *
>> + * So, avoid that situation when running those tests on MTL by skipping the
>> + * compute engines.
>> + */
>> +static bool skip_bad_engine(int fd, const struct intel_execution_engine2 *e) {
> --------------------------------------------------------------------------------^
>
> Please put '{' in separate line (see offset_in_page() below).
Doh. Not sure how I missed that.

John.


>
> Regards,
> Kamil
>
>> +	return IS_METEORLAKE(intel_get_drm_devid(fd)) && (e->class == I915_ENGINE_CLASS_COMPUTE);
>> +}
>> +
>>   static unsigned int offset_in_page(void *addr)
>>   {
>>   	return (uintptr_t)addr & 4095;
>> @@ -2006,6 +2022,9 @@ static igt_spin_t *__noise(int fd, uint64_t ahnd, const intel_ctx_t *ctx,
>>   	gem_context_set_priority(fd, ctx->id, prio);
>>   
>>   	for_each_ctx_engine(fd, ctx, e) {
>> +		if (skip_bad_engine(fd, e))
>> +			continue;
>> +
>>   		if (spin == NULL) {
>>   			spin = __igt_spin_new(fd,
>>   					      .ahnd = ahnd,
>> @@ -2313,6 +2332,9 @@ static void preempt_self(int fd, const intel_ctx_cfg_t *cfg,
>>   	n = 0;
>>   	gem_context_set_priority(fd, ctx[HI]->id, MIN_PRIO);
>>   	for_each_ctx_cfg_engine(fd, cfg, e) {
>> +		if (skip_bad_engine(fd, e))
>> +			continue;
>> +
>>   		spin[n] = __igt_spin_new(fd,
>>   					 .ahnd = ahnd[NOISE],
>>   					 .ctx = ctx[NOISE],
>> -- 
>> 2.43.0
>>



More information about the igt-dev mailing list