All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jay Cornwall <jay.cornwall@amd.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
	amd-gfx@lists.freedesktop.org
Cc: Kent Russell <kent.russell@amd.com>
Subject: Re: [PATCH v3] drm/amdgpu: Increase KIQ invalidate_tlbs timeout
Date: Wed, 2 Apr 2025 11:33:59 -0500	[thread overview]
Message-ID: <c7226b8f-ff7c-4e7b-b3d9-e3792a1d5369@amd.com> (raw)
In-Reply-To: <be35f643-0006-4a12-be34-2b0f02cb3a5f@gmail.com>

On 4/2/2025 02:37, Christian König wrote:

>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>> index ffca74a476da..3cdb5f8325aa 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>> @@ -356,7 +356,6 @@ enum amdgpu_kiq_irq {
>>   	AMDGPU_CP_KIQ_IRQ_DRIVER0 = 0,
>>   	AMDGPU_CP_KIQ_IRQ_LAST
>>   };
>> -#define SRIOV_USEC_TIMEOUT  1200000 /* wait 12 * 100ms for SRIOV */
>>   #define MAX_KIQ_REG_WAIT       5000 /* in usecs, 5ms */
>>   #define MAX_KIQ_REG_BAILOUT_INTERVAL   5 /* in msecs, 5ms */
>>   #define MAX_KIQ_REG_TRY 1000
> 
> Unrelated to this patch here, but defines like those *must* have an AMDGPU_ prefix.
> 
> Please fix in a follow up patch.

Sure. A deeper problem which has led to these macros is the duplication 
of polling logic across several different files.

We could instead move this code into amdgpu_fence_wait_polling. All 
clients would then abort early on in_reset or in_interrupt. There are a 
couple of users with different timeouts (adev->usec_timeout and a 
hard-coded 2100ms) which could be unified or retained with a fixed 5ms 
polling interval.

adev->usec_timeout is too low for this particular system under load.

      reply	other threads:[~2025-04-02 16:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-31 15:44 [PATCH v3] drm/amdgpu: Increase KIQ invalidate_tlbs timeout Jay Cornwall
2025-04-01 19:58 ` Kasiviswanathan, Harish
2025-04-02  7:37 ` Christian König
2025-04-02 16:33   ` Jay Cornwall [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=c7226b8f-ff7c-4e7b-b3d9-e3792a1d5369@amd.com \
    --to=jay.cornwall@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=kent.russell@amd.com \
    /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.