Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Badal Nilawar <badal.nilawar@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <anshuman.gupta@intel.com>,
	<john.c.harrison@intel.com>, <vinay.belgaumkar@intel.com>,
	<vivi.rodrigo@intel.com>
Subject: Re: [PATCH] drm/xe/guc: In guc_ct_send_recv flush g2h worker if g2h resp times out
Date: Fri, 27 Sep 2024 21:27:48 +0000	[thread overview]
Message-ID: <ZvcjVH9Y3AVjGMsI@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <20240927192428.1160211-1-badal.nilawar@intel.com>

On Sat, Sep 28, 2024 at 12:54:28AM +0530, Badal Nilawar wrote:
> It is observed that for GuC CT request G2H IRQ triggered and g2h_worker
> queued, but it didn't get opportunity to execute and timeout occurred.
> To address this the g2h_worker is being flushed.
> 
> Cc: John Harrison <John.C.Harrison@Intel.com>
> Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_guc_ct.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
> index 4b95f75b1546..4a5d7f85d1a0 100644
> --- a/drivers/gpu/drm/xe/xe_guc_ct.c
> +++ b/drivers/gpu/drm/xe/xe_guc_ct.c
> @@ -903,6 +903,17 @@ static int guc_ct_send_recv(struct xe_guc_ct *ct, const u32 *action, u32 len,
>  	}
>  
>  	ret = wait_event_timeout(ct->g2h_fence_wq, g2h_fence.done, HZ);
> +
> +	/*
> +	 * It is observed that for above GuC CT request G2H IRQ triggered

Where is this observed. 1 second is a long to wait for a worker...

> +	 * and g2h_worker queued, but it didn't get opportunity to execute
> +	 * and timeout occurred. To address the g2h_worker is being flushed.
> +	 */
> +	if (!ret) {
> +		flush_work(&ct->g2h_worker);
> +		ret = wait_event_timeout(ct->g2h_fence_wq, g2h_fence.done, HZ);

If this is needed I wouldn't wait 1 second, if the flush worked
'g2h_fence.done' should immediately be signaled. Maybe wait 1 MS?

Matt

> +	}
> +
>  	if (!ret) {
>  		xe_gt_err(gt, "Timed out wait for G2H, fence %u, action %04x",
>  			  g2h_fence.seqno, action[0]);
> -- 
> 2.34.1
> 

  parent reply	other threads:[~2024-09-27 21:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-27 19:24 [PATCH] drm/xe/guc: In guc_ct_send_recv flush g2h worker if g2h resp times out Badal Nilawar
2024-09-27 20:26 ` ✓ CI.Patch_applied: success for " Patchwork
2024-09-27 20:26 ` ✓ CI.checkpatch: " Patchwork
2024-09-27 20:27 ` ✓ CI.KUnit: " Patchwork
2024-09-27 20:39 ` ✓ CI.Build: " Patchwork
2024-09-27 20:41 ` ✓ CI.Hooks: " Patchwork
2024-09-27 20:43 ` ✓ CI.checksparse: " Patchwork
2024-09-27 21:08 ` ✓ CI.BAT: " Patchwork
2024-09-27 21:27 ` Matthew Brost [this message]
2024-10-01  8:11   ` [PATCH] " Nilawar, Badal
2024-10-01 17:49     ` Nilawar, Badal
2024-10-02 14:04     ` Matthew Brost
2024-10-03  9:54       ` Nilawar, Badal
2024-10-04  6:50         ` Matthew Brost
2024-10-04 10:06           ` Nilawar, Badal
2024-09-30  6:46 ` ✗ CI.FULL: failure for " 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=ZvcjVH9Y3AVjGMsI@DUT025-TGLU.fm.intel.com \
    --to=matthew.brost@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=john.c.harrison@intel.com \
    --cc=vinay.belgaumkar@intel.com \
    --cc=vivi.rodrigo@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox